multiple logical tests in an IF function

  • Thread starter Thread starter Priscilla
  • Start date Start date
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
 
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)
 
=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
 
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
 
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 :)
 
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.webp
    Untitled.webp
    65.2 KB · Views: 1,281
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")
 
Back
Top