ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   IF function for two columns in diffent cases (https://www.excelbanter.com/excel-programming/399956-if-function-two-columns-diffent-cases.html)

pt_lily

IF function for two columns in diffent cases
 
I have two columns that I need to compare and get a TRUE or FALSE answer on
if the text in the columns match. The problem is that the case of the text
in the two columns is different. One column is in all CAPS and the other is
using Proper formatting. I have tried using the IF function after converting
one column to all CAPS using the UPPER formula, but it still returns a FALSE
even if the colums match. Is there another way to get a TRUE or FALSE since
the cases do not match?

Thank you!

Bob Phillips

IF function for two columns in diffent cases
 
Doesn't sound like case is the problem. Try TRIM ing the cells to remove any
leading/trailing spaces.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"pt_lily" wrote in message
...
I have two columns that I need to compare and get a TRUE or FALSE answer on
if the text in the columns match. The problem is that the case of the
text
in the two columns is different. One column is in all CAPS and the other
is
using Proper formatting. I have tried using the IF function after
converting
one column to all CAPS using the UPPER formula, but it still returns a
FALSE
even if the colums match. Is there another way to get a TRUE or FALSE
since
the cases do not match?

Thank you!




Bernie Deitrick

IF function for two columns in diffent cases
 
pt_lily,

=A1=B1

will return TRUE independent of case.

You would actually need to use =EXACT(A1,B1) to show differences in case.

HTH,
Bernie
MS Excel MVP


"pt_lily" wrote in message
...
I have two columns that I need to compare and get a TRUE or FALSE answer on
if the text in the columns match. The problem is that the case of the text
in the two columns is different. One column is in all CAPS and the other is
using Proper formatting. I have tried using the IF function after converting
one column to all CAPS using the UPPER formula, but it still returns a FALSE
even if the colums match. Is there another way to get a TRUE or FALSE since
the cases do not match?

Thank you!




pt_lily

IF function for two columns in diffent cases
 
Thank you for the help. That seems to be what the problem is. All of the
text in one of the columns has several trailing spaces at the end. Is there
a way to get rid of these without doing it all manually? My spreadsheet has
about 6,000 lines.

Thanks again!


"Bob Phillips" wrote:

Doesn't sound like case is the problem. Try TRIM ing the cells to remove any
leading/trailing spaces.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"pt_lily" wrote in message
...
I have two columns that I need to compare and get a TRUE or FALSE answer on
if the text in the columns match. The problem is that the case of the
text
in the two columns is different. One column is in all CAPS and the other
is
using Proper formatting. I have tried using the IF function after
converting
one column to all CAPS using the UPPER formula, but it still returns a
FALSE
even if the colums match. Is there another way to get a TRUE or FALSE
since
the cases do not match?

Thank you!





Bob Phillips

IF function for two columns in diffent cases
 
Just cater for it in the formula

TRIM(B3) for instance

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"pt_lily" wrote in message
...
Thank you for the help. That seems to be what the problem is. All of the
text in one of the columns has several trailing spaces at the end. Is
there
a way to get rid of these without doing it all manually? My spreadsheet
has
about 6,000 lines.

Thanks again!


"Bob Phillips" wrote:

Doesn't sound like case is the problem. Try TRIM ing the cells to remove
any
leading/trailing spaces.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"pt_lily" wrote in message
...
I have two columns that I need to compare and get a TRUE or FALSE answer
on
if the text in the columns match. The problem is that the case of the
text
in the two columns is different. One column is in all CAPS and the
other
is
using Proper formatting. I have tried using the IF function after
converting
one column to all CAPS using the UPPER formula, but it still returns a
FALSE
even if the colums match. Is there another way to get a TRUE or FALSE
since
the cases do not match?

Thank you!








All times are GMT +1. The time now is 05:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com