Here's the situation:
Let's say I have an IP address in cell E4 of 10.234.8.11. I use a formula to extract the 2nd and 3rd octets, and place that result in F4:
=TRIM(LEFT(SUBSTITUTE(REPLACE(E4,1,FIND(".",E4),""),".",REPT(" ",100),2),100)) ----> result is 234.8 in cell F4
I also some data arranged like this (in two columns):
STL 234.8
OMJ 236.7
CHI 238.9
Let's say for STL, the value 234.8 is in cell C4. My goal is to create a formula in cell G10 (an IF statement) to see if F4 matches C4. If it matches, place "textA" in G10l. If it doesn't match, place "textB" in G10.
I've formatted F4 and C4 as text.
I can physically see that the result of the formula in F4 does in fact match C4, yet if I do this as a test:
=IF(C4=F4,"yes","no")
It comes out "no" (when I can clearly see they ARE identical).
Yet if I do this:
=EXACT(C4,F4)
it comes out TRUE.
What the heck is going on????? Should I be doing something else to say "Compare the result of the formula in F4 with C4? It just makes no sense the the EXACT command gives me the result I'd expect, but the IF formula doesn't.
Thanks,
Andy
Let's say I have an IP address in cell E4 of 10.234.8.11. I use a formula to extract the 2nd and 3rd octets, and place that result in F4:
=TRIM(LEFT(SUBSTITUTE(REPLACE(E4,1,FIND(".",E4),""),".",REPT(" ",100),2),100)) ----> result is 234.8 in cell F4
I also some data arranged like this (in two columns):
STL 234.8
OMJ 236.7
CHI 238.9
Let's say for STL, the value 234.8 is in cell C4. My goal is to create a formula in cell G10 (an IF statement) to see if F4 matches C4. If it matches, place "textA" in G10l. If it doesn't match, place "textB" in G10.
I've formatted F4 and C4 as text.
I can physically see that the result of the formula in F4 does in fact match C4, yet if I do this as a test:
=IF(C4=F4,"yes","no")
It comes out "no" (when I can clearly see they ARE identical).
Yet if I do this:
=EXACT(C4,F4)
it comes out TRUE.
What the heck is going on????? Should I be doing something else to say "Compare the result of the formula in F4 with C4? It just makes no sense the the EXACT command gives me the result I'd expect, but the IF formula doesn't.
Thanks,
Andy