Reputation: 456
I am having trouble with the formula below as it is not pulling the correct value or perhaps the formula needs to be tweaked.
=IF((AND(Sheet1!H10>65,D17>=65)),Sheet2!D$47,VLOOKUP(D17,Sheet2!$A$2:$K$51,4,FALSE))
What I am basically trying to do is if the value in H10 is greater than 65 and the value in D17 > or = 65 then pull the value from sheet2 D47 cell. Other wise use vlookup to lookup the value.
I have a case where The value in D17 =66 however, it is returning the value based on the vlookup and not Sheet2-D47.
Also, is it possible to have multiple IFs in the same formula?
Upvotes: 0
Views: 37
Reputation: 641
Where are you writing the formula? If your formula isn't on sheet1 D17 might be pointing at the wrong cell. It sounds like it would be pointing to the correct D17 if your vlookup is working though. Remember with an AND formula, all conditions need to be true. Is H10>65? if not then even with D17 = 66 then if statement will return false and execute the vlookup.
And yes you can have nested if statements (I believe 7 is the most). but you can do:
=if(A5>5, if(A5 = 7, "A5 is greater than 5 and equals 7", "A5 is greater than
5, but does not equal 7"),"A5 is less than 5)
Upvotes: 0