View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Thij_rahya Thij_rahya is offline
external usenet poster
 
Posts: 1
Default Wrong Result with an IF function

This is odd:

=IF(LEN(VLOOKUP($A4,SAMPLE!$A$9:F201,6,FALSE))=0,J 4,T(INDIRECT("$M$"&((CELL("ROW")-3)+(LEN(VLOOKUP($A4,SAMPLE!$A$9:F201,6,FALSE))+2)/5))))

Let me bread it down
"=IF(LEN(VLOOKUP($A4,SAMPLE!$A$9:F201,6,FALSE) )=0" is FASE

Skip, "J4" for the "False" part of the equation
"T(INDIRECT("$M$"&((CELL("ROW")-3)+(LEN(VLOOKUP($A4,SAMPLE!$A$9:F201,6,FALSE))+2)/5))))" comes to equal "Red, White"

when I run the formula evaluation it comes down to the last step where it says

"IF(FALSE,#N/A,"Red,White")" and when I click on Evaluate it gives me a
completely random color. In this case, it's Red. in other places where the
answer should be Classic Navy, and the formula says "IF(FALSE,#N/A,"Classic
Navy")" it will still come up "Red" or "Blue" or some random color.

I have noticed that if I change the grammar of the formula it will correct
that one cell, but when I fix all the other cells to a similar grammar, it
breaks again.

Is there a work around for this, or, because I am using cell references that
contain other formulas and this is quite a large spreadsheet, am I just
overtaxing Excel's abilities?