Last week we tapped into the insight of Excel logical operators that are used to compare data in different cells. Today, you will see how to extend the use of logical operators and construct more elaborate logical tests to perform more complex calculations and more powerful data analysis. Excel logical functions such as AND, OR, XOR and NOT will help you in doing this. Continue reading
Comments page 3. Total comments: 567
Scenario:
Column A
Aug-20
Dec-20
Jan-21
Mar-21
I want Column B to populate the following:
IF A2=Dec-20 and JAN-20 then enter FY 21 in Column b2 otherwise enter FY 20
Hello!
Sorry, I do not fully understand the task.
What does the condition mean "IF A2=Dec-20 and JAN-20"? You cannot write two values in a cell.
I want to know what to do if I want to multiply a value only if it's present.
Like in a store , different type of scrolls are there and I want to multiply the scrolls value with 100 if it's present..what should be the columns and the function?
Please help someone..
Hello!
If I understand your task correctly, the following formula should work for you:
=IF(A1<>"",A1*100,"")
I hope it’ll be helpful.
I need a help ... The question is What is AND Function ?
Hi everyone!
Can you check my answer for this one? I am not sure of my answer hehe. Thank you in advance for helping me! Sorry for using your time. Stay safe and wash your hands!
Determine whether the total earning of Ms. Chan is not equal to Mr. Tan’s total earning.
Formula: =AND(H3H7)
Output: TRUE
I am not sure if I will use AND,OR ,or NOT function. Can you give me a tip when to use them? Thank you so much in advance!
its me again!
I just want to edit my comment.
it should be: =AND(H3H7)
Hello!
I hope you have studied the recommendations in the tutorial above. It contains answers to your question.
You only have one condition. Therefore, you don't need to use AND.
=IF(H3 >= H7,TRUE,FALSE)
I hope it’ll be helpful.
May I suggest a simpler solution?
=NOT(H3=H7)
Hi Sir Alexander!
Thank you for answering my question! Thank you so much for helping me and it helped a lot.
I hope you stay safe amidst this pandemic that is happening throughout the world. Stay healthy and wash your hands!
Can you help me in this one?
How: determine if the number
is zero, odd and even.
By using the MOD(to get the remainder) with IF function
Thank you in advance for helping me!!
its me again!
I can't put any symbols lol
=AND(H3H7)
if the symbols disappeared on the comment, that should be the symbol of less than and greater than. Thank you! Please help me
I need some help. Is there a function I can use to solve my problem. I have a column, that has cells that contain text with commas...below are a few examples:
Z28 = AREA, CONS, DEX
Z29 = CTM, MSC, AREA, CONS, DEX
Z30 = AREA, CONS, DEX,LHC
I am trying to solve for:
- if any cell in Z column contains any, all, or some of the following: AREA, CONS, DEX, CTM or MSC return value "Need 1"
- if any cell in Z column contains LHC return value "Need 2"
- If any cell contains LHC and any, all, or some of the following: AREA, CONS, DEX, CTM or MSC return value "Need 1 & 2"
So for example:
Z28 = AREA, CONS, DEX; value returned would be "Need 1"
Z29 = CTM, MSC, AREA, CONS, DEX; value returned would be "Need 1"
Z30 = AREA, CONS, DEX,LHC; value returned would be "Need 1 & 2"
Does this make sense?
Hello!
You can use IF and AND formula:
=IF(AND(SUM(IFERROR((FIND({"AREA","CONS","DEX","CTM","MSC"},Z28,1)),0))>0,IFERROR(FIND("LHC",Z28,1),0)>0),"Need 1&2", IF( AND(SUM(IFERROR((FIND({"AREA","CONS","DEX","CTM","MSC"},Z28,1)),0))>0,IFERROR(FIND("LHC",Z28,1),0)=0),"Need 1",
IF(AND(SUM(IFERROR((FIND({"AREA","CONS","DEX","CTM","MSC"},Z28,1)),0))=0,IFERROR(FIND("LHC",Z28,1),0)>0),"Need 2","")))
Simpler and shorter formula with CHOOSE function:
=CHOOSE(IF(SUM(IFERROR((FIND({"AREA","CONS","DEX","CTM","MSC"},Z28,1)),0))>0,1,0)+IF(IFERROR(FIND("LHC",Z28,1),0)>0,2,0),"Need 1","Need 2","Need 1&2")
I hope my advice will help you solve your task.
Hi! Need assistance...
Using AND function,
I used logical functions in two other cells and the result is TRUE for both cells. Now, I want the two cells with TRUE results as precedents for another computation with AND function. When I apply the AND referring these two cells with both True results, it give False output. Instead, the result for two referred cells with TRUE text in it, should be a true. The formula didn't prompt to an error either.. what could be the possible reason behind that....
Thanks
Hello!
Sorry, it's not quite clear what you are trying to achieve. For me to be able to help you better, please describe your task in more detail. Please specify what you were trying to find, what formula you used and what problem or error occurred. Give an example of the source data and the expected result.
It’ll help me understand it better and find a solution for you. Thank you.
Using excel formulae, find out the following
1. How many have neither registered nor completed any of the 3 courses?
2. How many have registered or trained in atleast 2 of the 3 courses?
3. How many have not been trained in any of the 3 yet?
Name SQL SAS Excel R - Registered for training (training not done yet)
Prakash R T T - Trained
Rahul R Blank - Neither
Rajiv T
Priya R T
Amit T
Karthik R
Shobha R
Prateek
Payal R
Prashant T
Anil R
Swaroop T
Tejas R
Raghav T
Sanjeev T
Madhu R
Murali
Aravind T
Balaji R
Mukundan T
Shweta R
Anusha T T
Ravi R
Rahul T
Ramya
Shriram R
Sairam T T
Srinivasan R
Trisha R
Paul T
Mani R
Venkat R
Abhishek T
Chanakya T R
Daniel R
Rishi R
Vikram R T
Prabhu R
Priya T
Mahesh R
Raj
Suresh R
Arun R
Jacob T
Malini
Mehul R
Rajeev
Sachin T R
Praphul
Diego R T
Hello!
To count the number of values for multiple conditions, use the COUNTIFS function. Please have a look at this article.
The IF function is the main logical function in Excel and is, therefore, the one to understand first. It will appear numerous times throughout this article.
For example, the ISTEXT function will check if a cell contains text and return TRUE if it does and FALSE if it does not. The NOT function is helpful because it can reverse the result of these functions.
Please assist me to correct this formula....
=IF(OR(C5:O5=0),"Open","Close")
I will update some data(it might be Alphabets, Numbers or Special Character) in respective cell from C5 to O5 and monitor the Status in P5, if any one of the cell From C5 to O5 is empty the cell P5 must return Open and if all the cell are filled then its show Closed.. Please help me to Solve this query.
Please assist me to correct this formula....
=IF(OR(C5:O5=0),"Open","Close")
Hello!
You cannot use a range in the conditions of IF, OR, AND functions. Therefore, each cell must be written separately:
=IF(OR(C5=0,D5=0,E5=0,..........),”Open”,”Close”)
Hello Alex..
Thanks for your reply..
I got it when tried with the separate cell. Again thanks for reply.
I mean a template to use for overtime calculation and task
Please i a template to use in calculating time for a task or for overtime
Can IF Function Replace XOR Function
The IF function is the main logical function in Excel and is, therefore, the one to understand first. It will appear numerous times throughout this article.
Please assist correct this formula
=,IF(H17<=$D$17*74%,"Unacceptable",IF($D$17*74%<H17<$D$17*95%,"Below Expectations",IF($D$17*95%<H17<$D$17*100%,"Competent",IF($D$17*101%<H17=$D$17*110%,"Outstanding",""))))))
Hello!
If I understand your task correctly, the following formula should work for you:
=IF(H17<=$D$17*74%,"Unacceptable", IF($D$17*74%<H17<$D$17*95%,"Below Expectations", IF($D$17*95%<H17<$D$17*100%,"Competent", IF($D$17*101%<H17=$D$17*110%,"Outstanding",""))))
Unfortunately, you did not write what data is used and what result should be obtained.
problem if Result is less or equal to 7 days than consider it 7. if result is more than 7days than cinsider actual days.
Thank you so much.
The very last one
I have a row of an approx 200 empty cells and I want to assign a number (1) at a defined interval (10.26)
The formula I'm working on is the following
IF (10.26-(C1+R1) less equal to 0.49; 1, 0)
which is working fine till I get to the cell 10
then I would like to SUM 10.26 + 10.26 so when I get to the cell 21 the next formula will be like
IF (20.52-(C21+R1) more equal to 0.49; 1, 0)
My question is: there is a way to nest the two functions and make the SUM work dinamically
maybe using a different formula altogether?
I think I was able to nest the two functions somehow
=--OR(OR(AND(10,26-(C1+R1)"less" 1*1;10,26-(C1+R1)"greater"0,49*1);
10,26-(C1+R1)"less equal"0,49*0);
OR(10,26-(C1+R1)"less equal"0,49*1;
(AND(10,26-(C1+R1)"less"1*0;10,26-(C1+R1)"greater"0,49*0))))
still I can't get around to make the sum (10.26+10.26) incremental
Hello Edoardo!
I’m sorry but your task is not entirely clear to me. Could you please describe it in more detail?
What are C1 and R1? Are these cell addresses? What cell should the first formula be in? In which cell will the second one be written, etc.?
Give an example of the expected result.
It’ll help me understand it better and find a solution for you. Thank you.
Hi Alexander,
imagine a theatre and a row of 120 seats, those are the empty cells
starting from R1,C1 to R1,C120 (row and column)
I want to assign a seat (1) every 10.26 chairs (cells)
so they are scattered irregurarly row after row.
I start counting from 1 to 10.26 and the first cell occupied (1=true) is
R1,C9 - 10.26-(1+9)= 0.26
R1,C19 - 20.52-(1+19)= 0.52
R1,C29 - 30.78-(1+29)= 0.78
To keep it irregular, each time the number is greater than 0.50
I want to move the seat to the next cell so for example R1,C19 is FALSE but R1,C20 is TRUE.
The next problem is how to make 10.26 incremental cell after cell, but probably I found a solution.
Suppose the number 10.26 is stored in the cell F4, I will use something like this
=$F$4*(COLUMN()/10-8) even if I don't know yet how it will work in multiple rows.
The first cell in my array is I2, the first row starting from I1 have the numbers from 1 to 120 (DX)
The column H store the row numbers starting with H2(0) H3(120) H4(240) and so on.
The dimension of the array is not important, it can be as little as 24 cells per row.
Thanks for your help
Hello!
I wasted a lot of time, but I don't quite understand your calculations.
I already wrote earlier - Give an example of the expected result.
Indicate which numbers should be in the first row, which numbers should be in the second row.
Then I will try to help you
last try!!
I have a row of an approx 200 empty cells and I want to assign a number (1) at a defined interval (10.26)
The formula I'm working on is the following
IF (10.26-(C1+R1)0.49; 1, 0)
My question is: there is a way to nest the two functions and make the SUM work dinamically
maybe using a different formula altogether?
is the following
IF (10.26-(C1+R1)0.49; 1, 0)
My question is:
Let's see if I can explain my problem:
I have a row of an approx 200 empty cells and I want to assign a number (1) at a defined interval (10.26). The formula I'm working on is the following
IF (10.26-(C1+R1)0.49; 1, 0)
My question is: there is a way to nest the two functions and make the SUM work dinamically maybe using a different formula altogether?
Thanks in advance for taking the time to answer my question.
Hello!
I’m sorry but your task is not entirely clear to me. Could you please describe it in more detail? Thank you!
The msg was trunkated, here it is again
Let's see if I can explain my problem:
I have a row of an approx 200 empty cells and I want to assign a number (1) at a defined interval (10.26)
The formula I'm working on is the following
IF (10.26-(C1+R1)0.49; 1, 0)
My question is: there is a way to nest the two functions and make the SUM work dinamically
maybe using a different formula altogether?
Thanks in advance for taking the time to answer my question.
how to calculate for 3 of more arguments?
below is what I mean:
Grater or equator 100 =excellent
Between 50 to 90 =very good
Less than 40 =fail
Hello!
The formula below will do the trick for you:
=IF(A1>=100,"excellent",IF(AND(A1>=50,A1<=90),"very good",IF(A1<40,"fail","")))
I hope this will help.
I have a more complicated logic function than I can work out. I am assessing building capacity and need to identify a building as 'under capacity' (where room capacity is greater than customer numbers), 'extend hours' (where room capacity is less than customer numbers, but where opening hours are equal to or less than 37.5 hours per week) and 'exceeds capacity' (where room capacity is less than customer numbers, but where opening hours are more than 37.5 hours per week OR where the room capacity is identified as 'zero').
Please help!
Hello Phil!
If I understand your task correctly, the following formula should work for you:
=IF(F1 > F2,"under capacity",IF(F3 < 37.5,"extend hours","zero"))
where
F1 - room capacity
F2 - customer numbers
F3 - opening hours
Need result as below
1. If value is > or = 0 then result will be= 80,
2. If value is <0 to -03 then result will be= 70,
3. if value is -04 to -07 then result will be= 60
4. if value is -08 to -15 then result will be= 50
-Advance thanks
Hello!
There is no need to use the AND or OR function.
The formula below will do the trick for you:
=IF(A1>=0,80,IF(A1>-3,70, IF(A1>-7,60,IF(A1>-15,50,"" ) )) )
Hi I have a similar problem to the one above but I need to make the values specific to individual suppliers
e.g IF "ACE" is the supplier but I need to specify tariffs for different pipe sizes eg <20, 20-25,40-45,50-63 etc but different suppliers have different names, size ranges and tariffs how can I write this so the correct tariff is selected for each pipe size in each supplier?
I would greatly appreciate some help with this!
Thanks in advance
Hello!
You need to search by two criteria - the name of the supplier and the size of the pipe. Perhaps this article on searching by several criteria using the INDEX + MATCH functions will be useful
I hope this will help, otherwise please do not hesitate to contact me anytime.
Fantastic, thank you very much. I will look at the article just now. I may be back for more help....
Kind regards
Leigh
Hy! Help me please with the following two tasks. Thank you very much in advance!
1. Having a personal ID number starting 1 or 5 for boys and 2 or 6 for girls, I must write in a column if that person is a girl or a boy. I tried to combine IF and XOR functions but didn`t work for me.
2. how to transform the numbers like 6,05 into text in this format: (six,05%)
Congratulations for what you are doing in helping us!
Hello!
If I got you right, the formula below will help you with your task:
=CHOOSE(--LEFT(A1,1),"Boy","Girl", "","","Boy","Girl","","","")
and
=CHOOSE(--LEFT(A6,1),"one","two","three", "four","five","six","seven", "eight","nine")& MID(A6,SEARCH(",",A6,1),10)&"%"
I hope this will help
Help. I have a working formula like this, OR(D9="X", E9="55",D9="B"), in the data validation. How can I modify this in a way that when D9="B" then only "55" value is allowed in E9? meanwhile allowing any values on E9 when D9="X"?
Thank you in advance.
Hello Miles!
If I understand your task correctly, the following formula should work for you:
OR(AND(E9="55",D9="B"),D9="X")
I hope it’ll be helpful.
I want in excel sheet, 5+6+7*+8= 26. (*) it's cricket talk Batsman Not Out.
How I put in excel sheet.
Hello Sanjoy!
I’m sorry but your task is not entirely clear to me. Could you please describe it in more detail? What is "cricket talk Batsman Not Out"?? Also write what exactly you want to receive.I will try to help you.
CURR. T. INV. VALUE VALUE CONVERTED IN AED
USD 11,545.00 (CURRENCY(1)=VALUE IN AED) * INV VALUE = TOTAL CONVERSION VALUE
EUR 1,199.00
KWD 2,000.00
AED 5,000.00
QAT 12,000.00
GBP 1,500.00
USD 3.674
EUR 3.99
KWD 11.9
AED 1
QAT 1.01
GBP 4.59
Can anyone help me with the formula for the above.
If I enter the currency whether it's Eur or USD the amount will be converted automatically and whatever the conversion is, it will be multiplied by Column 2 (Total Value) and the total conversion will be on column 3.
Appreciate you help.
Hello Jane!
To show the rate for a necessary currency in cell C2, you can use this formula:
=VLOOKUP(A2,$A$10:$B$15,2,0)
$A$10:$B$15 is your table with the currency rate, A2 is a cell where the currency is specified (USD in your case).
Please read more about the VLOOKUP function here.
If you have any additional questions, I will be happy to answer them.
=IF(AND(E3<6,OR(TIME(11,45,0)<F3<TIME(12,0,0),TIME(18,45,0)<F3<TIME(19,30,0))),"early bird", "")
write a logical function to find out whether a customer is an early bird. (refer to the 'Early Bird' criteria stated above) In your function, you will have to reference Column E values (day of week) and Column F (time of order) to determine whether customers are early birds. Think about how you will reference the early bird criteria.
E3= weekday number (1-7)
f3 time 7:12pm
Early Bird criteria - Customers who want to avail of an Early Bird discount must place their orders on weekdays between 11:45 a.m. - 12:00 p.m. (for lunch) or 6:45 p.m. - 7:30 p.m. (for dinner).
can somebody help,
Hello Neha!
If I understand your task correctly, the following formulas should work for you:
=IF(AND(E3 < 6,OR(AND(TIME(11,45,0) < F3, F3 < TIME(12,0,0)), AND(TIME(18,45,0) < F3,F3 < TIME(19,30,0)))), "early bird", "")
Hope you’ll find this information helpful.
thanks this note are very helpful to me as a student
Does RIGHT,LEN,FALSE belong to the logical category
Hi!
FALSE is categorized under Logical functions; RIGHT and LEN belong to the category of Text functions.
I need help please, i need to a formula about this problem, from jan. 26,2019 to feb. 25, 2019 there are four fridays and 27 working days. The thing i need is on calculating working days minus the working hours for the whole month, see below example
BG5 BH5 BI5
Total Working Hrs Total Regular Hrs Total Overtime Hrs
is from jan26 to feb25 is only 260 hrs is what i also need formula
and the january month has 31 therefore the total days until february 25 is also 31 days but i need only 26 working days and 4 days fridays. I tried the formula for total overtime as this:=IF(BG5=>BH5,BG5-BH5,0) it only applies when there is only 30 days a month and 4 fridays but does not gave me when there are 5 fridays in a month and also if there is 31th day of the month.
Any help is Greatly appreciated!
If cell B2 = 43830 (which is December 31, 2019 and assuming that cell B2 does say December 31, 2019) and if (-5 + 2 +7)>0 which is also true, how do I write this to make it work in an IF/AND statement?
Any help is Greatly appreciated!
=if(and(b2=date(2019,12,31),(-5+2+7)>0),"value if true","value if false")
This article was extremely well-made and useful. Thanks! One question tho, when using a formula with the same format as =OR($C1"", $D2"") , could I instead do =OR(C1:C2"") ?
Hi all,
I need assistance with the following conditions for a sales model.
The user wants to sell widgets and they do not want be charged for the 1st 5000 sales. They will then be billed $20 for each widget over 5000 sales. They also only want to pay for a maximum number of widgets (10,000) even if sales exceed this level.
Any assistance would be greatly appreciated.
Hi Team,
I need assistance, currently the formula below, works Ok for Text "2019" value in particular column, We converting mmm,dd, yyyy to MM/dd/yyyy. Since the file now contains some "2020" value in text the formula does not convert. I need the Formula to work for Text "2019" or "2020" as well. Please shed some light!!!
=(TEXT(SUBSTITUTE(report!B2,"2019,","2019"),"mm/dd/YYYY"))
HI
Can you help me
How to merge the following formula Merged In Excel please suggest
1.(SUMIF(C1:C8,C5,L1:N7))
2.IF(I5,"<0",0)
Can you help me write the formula for the following situation: Family Reunion Fees for
different age groups. I have 2 columns: Column #1 Age; Column #2 Reunion Fee.
Reunion Fee has these categories:
If Age is between 13 and 100 then the fee is $125
If Age is between 4 and 12 then the fee is $85
If Age is 3, then the fee is $45
If Age is between 0 and 2 the fee is $0
I have a data form and will be type in the Age in column #1. I want Excel to select the fees. (I do have a table with the ages and the fees) I don't know how to write a formula that will look up fee for the different ages put that fee in Column #2.
Information in a Table:
Ages Reunion Fee
13 to 100 $125
4 to 12 $85
3 $40
0-2 $0
Hi,
Can you help me with the formula with 3 conditions to find/count >1hr login & >0 Calls = "Considered for Billing", <1hr login <0 Calls = "Not Considered for Billing", <8hrs login & <0 Calls = "Considered for Billing".
SL User ID Total No of Calls
1 1001 8:30:00 80
2 1002 8:00:00 54
3 1008 8:00:00 0
4 1007 3:00:00 34
5 1006 2:00:00 15
6 1003 1:00:00 1
7 1004 1:00:00 0
I had been using lotus 123 a lot.
In lotus for doing data querry which i filtering data in excel, i could use criterion as logical conditions like age>5#and#age5, age<9)
does not seem to work
Any solutions
Please can someone help me solving the following problem.
In my case
cell values are as follows:
D67=0,5
D68=0,7
D69=0,9
When I select the value 0,5 (D67) i want it to move to D21, D22 and D23 into my calculation sheet
and when I select 0,7 (D68) I want that this value moves to D21, D22 and D23 of my calculation sheet instead and replacing the forgoing value 0,5 ...and so on.
Is there a solution to this problem?
Kindest thanks for your help
Peter
Hi!
I’m doing some investment cost analysis on a power plant project and could need some help.
So if I have a plant from 400 MW higher use this formula to estimate cost, if below 400 MW then use this other formula with a coefficient. Do you have any ideas how I could write this?
BR
Marco
Hi All,
I need a formula for the following:
If the sale date is more than a year from the purchase date then give me half the gain, if not give me the full gain.
So...
Purchase Date Sale Date Gain Net gain
11/03/2018 12/03/2019 5,000 2,500
13/03/2018 12/03/2019 5,000 5,000
I have seven cells (week days),
Monday 15
Tuesday 20
Wednesday 16
Thursday 0
Friday 0
Saturday 0
Sunday 0
and, i update everyday respective day of week. So, I need an "If" formula, that calculate average only for days that their cell is different from 0? (So, if it is Thursday, when i update that cell of Thursday, I want that the average formula to calculate average of days Monday-Thursday only that their value is more than 0, not rest days).
Thank you :)
Hi
Could you please help me
For example
A1. 100
B1. 50
I need 10%,more than B1 not greater than A1 if the value less than 10% I need A1 valvu
JSC_GPA SSC_GPA HSC_GPA Out_Come
Best Best Best ?
Best Best Good ?
Good Good Medium ?
Best Good Best ?
Best Best Good ?
Best Best Best ?
There are 4 possible categories
* Best
* Good
* Medium
* Low
if 2 of then Best then Out_Come Best
if 2 of then Good then Out_Come Good
if 2 of then Medium then Out_Come Medium
if 2 of then Low then Out_Come Low
Please Help Me....
sir,
please help how to coding in Ms Excel for the give table in ONE cell.
=IF(D10-E10=1,"1",IF(D10-E10=1, AND C10=2,"2",IF(C10-D10=2, AND E10=1,"3",IF(C10=1, ANDE10=2,"4",IF(C10-E10=2, AND D10=1,"5",IF(C10-E10-D10=2,"6"))))))
PLZ CORRECT THE ABOVE FORMULA
Hello,
Could you please help me why my function does not work:
=IF(OR(CO2="4 - High Professional",CO2="7 - Versatile Performer",CO2="8 - Future Star",CO2="9 - Star Performer","Top Talent",IF(CO2="0","Not Reviewed","Rest")))
Thank you for your suggestions
one day i'll understand
same bro same ajwndoiwejfie