multiple logical tests in an IF function

P

Priscilla

I would like to automate a spreadsheet using 2 logical
tests; basically something like this:

IF ((B3="text") AND (C3="text"),$00.00,0)

I know that doesn't work, but I think it should. Can
someone help me with this?? I'm trying to assign a dollar
value using two sets of criteria.

Thanks
 
K

Kevin Stecyk

Priscilla,

You are very close.

=IF(and((B3="text"),(C3="text")),$00.00,0)

HTH

Regards,
Kevin
 
C

Chip Pearson

Priscilla,

Try something like the following:

=IF(AND(B3="text",C3="text"),TRUE,FALSE)

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)
 
K

Ken Wright

=IF(AND(ISTEXT(A1),ISTEXT(B1)),999,0)

or

=IF(AND(ISTEXT(A1:B1)),999,0) array entered using CTRL+SHIFT+ENTER

Replace 999 with whatever your values if true are
 
K

Kevin Stecyk

Priscilla,

Upon further reflection, both the true and false will give you the same
answer: 0. The formatting of the cell will dictate how it is displayed. Is
that what you want? It appears to be you will get a 0 regardless.

Perhaps this?

=IF(and((B3="text"),(C3="text")),$00.00,"")

Now if it is false, you will get a blank cell.

Regards,
Kevin
 
Joined
Aug 14, 2012
Messages
4
Reaction score
0
Great help so far but I can't get mine to work!!! It is a little different, however. My two logical tests are as follows for variables x and t:
if x>y
and if (r-2)<t<(r+2.5)
then "A" else "B"

does that make sense? here is my formula...

=IF(AND((O37>Q37),((G37-2)<M37<(G37+2.5))),"A","B")

thank you :)
 
Joined
Jan 8, 2015
Messages
2
Reaction score
0
I Have a table like the attached images. I want to extract the latest "Project Starting date) subject to "Project Completed" and "Project Site.

"I want to know the latest project started date where the the project already completed in Dhaka.

I have tried with the following formula..

=MAX(IF(AND(Times!D3:D500=G1,Times!A3:A500=G2),Times!B3:B500))

But answer returning "0"

whereas the answer should be 12th May ..
Please help me friends...
 

Attachments

  • Untitled.png
    Untitled.png
    32.3 KB · Views: 1,274
Joined
Jun 11, 2015
Messages
1
Reaction score
0
Priscilla,

You are very close.

=IF(and((B3="text"),(C3="text")),$00.00,0)

HTH

Regards,
Kevin


Hi Kevin

If i want the value if true to remain "Y" and if false remain "N" when;
either C8 or C9 are =Y in the statement below?

=IF(AND(C3="Y", (C4="Y"),(C5="N"), (C6="N"),(C7="N"),(C8="Y"),(C9="Y"),(C10="Y"),(C11="Y"),(C12="Y"),(C13="N")), "Y","N")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top