Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Help - cannot compare values properly even though they display same thing!
I have a simple IF statement that compares the values of two cells:
=IF(D5=G5,"Good","Bad"). Simple enough. The problem is that even when the value of the cell is exactly the same i.e both D5 and G5 show "WT_STEDY", it is still returning "Bad". I did a little bit of error checking: trimmed both cells to ensure no rogue spaces were there etc. The difference lies in the formula bar. For cell G5, the bar shows:"WT_STEDY" whereas for cell D5 it shows "=PISampDat($D$1,$B$5,$B $748,"1h", 0)" which is call from a database. How do I change my original IF statement to compare the actual strings output / displayed in the two cells?? I don't mind using some VB, but I'd rather not because the problem seems so trivial. Regards, Tom |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Help - cannot compare values properly even though they display same thing!
You shouldn't need to do anything special -- Excel's IF statement DOES
compare the value, not the formula. Click in the formulabar for D5 & press F9 -- does it still say WT_STEDY? Do you have calculation set to automatic? Bob Umlas Excel MVP "Tommy" wrote in message ups.com... I have a simple IF statement that compares the values of two cells: =IF(D5=G5,"Good","Bad"). Simple enough. The problem is that even when the value of the cell is exactly the same i.e both D5 and G5 show "WT_STEDY", it is still returning "Bad". I did a little bit of error checking: trimmed both cells to ensure no rogue spaces were there etc. The difference lies in the formula bar. For cell G5, the bar shows:"WT_STEDY" whereas for cell D5 it shows "=PISampDat($D$1,$B$5,$B $748,"1h", 0)" which is call from a database. How do I change my original IF statement to compare the actual strings output / displayed in the two cells?? I don't mind using some VB, but I'd rather not because the problem seems so trivial. Regards, Tom |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Help - cannot compare values properly even though they display sam
Select the cell with the =PISampDat($D$1,$B$5,$B$748,"1h", 0) formula
Press the F2 key, then the F9 key. Does the result EXACTLY match your WT_STEDY string, or is there a leading/trailing space(s) "Tommy" wrote: I have a simple IF statement that compares the values of two cells: =IF(D5=G5,"Good","Bad"). Simple enough. The problem is that even when the value of the cell is exactly the same i.e both D5 and G5 show "WT_STEDY", it is still returning "Bad". I did a little bit of error checking: trimmed both cells to ensure no rogue spaces were there etc. The difference lies in the formula bar. For cell G5, the bar shows:"WT_STEDY" whereas for cell D5 it shows "=PISampDat($D$1,$B$5,$B $748,"1h", 0)" which is call from a database. How do I change my original IF statement to compare the actual strings output / displayed in the two cells?? I don't mind using some VB, but I'd rather not because the problem seems so trivial. Regards, Tom |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
PLS HLP Waterfall doesn't display properly | Charts and Charting in Excel | |||
How do I compare values of two cells and display the lowest. | Excel Worksheet Functions | |||
Compare values, display date | Excel Worksheet Functions | |||
I have a problem to properly display the title of Value (Y) axis i | Charts and Charting in Excel | |||
Excel Compare values in columns & display missing values in a new | Excel Discussion (Misc queries) |