if statement help needed

%3CLINGO-SUB%20id%3D%22lingo-sub-1645280%22%20slang%3D%22en-US%22%3Eif%20statement%20help%20needed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1645280%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20trying%20to%20discover%20if%20the%20number%20sequence%20in%20column%20I%20equal%20the%20number%20sequence%20in%20column%20B.%20I%20know%20they%20do%2C%20but%20my%20%3Dif(%20statement%20is%20telling%20me%20otherwise.%20What%20can%20I%20do%20to%20fix%20this%3F%20All%20cells%20are%20set%20to%20%22general%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1645280%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1645324%22%20slang%3D%22en-US%22%3ERe%3A%20if%20statement%20help%20needed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1645324%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F688358%22%20target%3D%22_blank%22%3E%40kristen2020%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOne%20could%20be%20text%2C%20another%20number%2C%20not%20clear%20from%20the%20screenshot.%20If%20so%2C%20keep%20in%20same%20format%20or%20convert%20when%20compare.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1645368%22%20slang%3D%22en-US%22%3ERe%3A%20if%20statement%20help%20needed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1645368%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%20as%20mentioned%20in%20my%20original%20message%2C%20all%20cells%20are%20set%20to%20%22general%22.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I'm trying to discover if the number sequence in column I equal the number sequence in column B. I know they do, but my =if( statement is telling me otherwise. What can I do to fix this? All cells are set to "general".

 

Thanks in advance.

8 Replies

@kristen2020 

One could be text, another number, not clear from the screenshot. If so, keep in same format or convert when compare.

@Sergei Baklan 

 

Thanks, as mentioned in my original message, all cells are set to "general".

@kristen2020 

You may apply General to text and number, text will continue to be text and number the number. Perhaps you may submit sample file with couple of records toc heck. Or at least try =ISTEXT() on both.

@Sergei Baklan 

 

I'm afraid I don't understand what "toc heck" is. I had tried putting both columns I and B as numbers and then also as text, but that didn't work either, so I kept them both as general. I applied the suggested =istext(), but that only turned my number sequence into "true". 

 

I appreciate you trying to help me through why my statement is failing me.

@kristen2020 

FYI, "toc heck" is a typo for "to check".

 

You may be dealing with a trailing space at the end of you number in either column.

 

@Bennadeau 

 

ha. Thanks for pointing out the typo. Figured it was something else from excel I knew nothing about

 

In regard to a trailing space, you were correct. Column B had that. Appreciate your input! Curious though, I tried =trim(), but that didn't work. I had to go into each cell individually to delete that trailing space. Any thoughts as to why =trim() didn't work?

@kristen2020 

I mean test like this to check do you have numbers or texts

image.png

@Sergei Baklan 

 

Thank you for clarifying that. I'll keep this in my back pocket in case I need to use it down the line. Appreciate you helping out!