Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default 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!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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!




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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!






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula for Cases=144 * # of Cases + Pieces Inventory Formula Excel Discussion (Misc queries) 2 December 29th 09 09:09 PM
formula for coping a cell from a diffent sheet Shallow Excel Discussion (Misc queries) 5 September 19th 08 05:46 PM
Code to Ignore Certain Cases in a Looping Function [email protected] Excel Programming 4 September 7th 07 10:38 PM
map data (x-y axis) with diffent series name Penny Charts and Charting in Excel 1 October 16th 06 11:28 AM
GCD Function doesn't work in some cases GCD_Dilemma Excel Worksheet Functions 5 November 8th 04 08:18 PM


All times are GMT +1. The time now is 12:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"