Home News Reviews Forums Shop


HELP: Compare two cols containing text in Excel ROW by ROW?

General discussion. Come introduce yourself. Talk about whataver you want!

HELP: Compare two cols containing text in Excel ROW by ROW?

Postby VEFF on Tue May 04, 2004 11:17 am

I have an Excel spreadsheet and would like to compare
columns B and E (both contain text strings) on a ROW by ROW basis.

In other words, I only care whether the data in column B row 3
matches column E row 3- I don't care if the same string is on a DIFFERENT row, only if it is on the same row I am currently comparing.
Therefore I don't think a VLOOKUP is the way to go here.

I have looked online for a bit, and tried a simple formula I found on a an Excel forum:
=IF(B3<>E3,"N"," ")
This is supposed to print N if the values don't match.
I couldn't get it to work - it always printed N, even when the text was identical.
I tried using the TEXT and STRING functions, but couldn't get it to work.

Since I am pressed for time, I wanted to ask for help here, rather than spend the next hour looking online.

Thanks!
Burners only:
Pioneer DVR-115D
Pioneer DVR-111D
Plextor PX-716A TLA0304
Plextor PX-716A same TLA

LiteOn 52246S 52X CD-RW
LiteOn 52246S (another)
LiteOn 52327S 52X CD-RW
TDK 40X USB 2.0 CD-RW
TEAC CD-W540E 40X CD-RW
User avatar
VEFF
CD-RW Player
 
Posts: 2025
Joined: Tue Jan 15, 2002 9:36 pm

Postby CowboySlim on Tue May 04, 2004 11:28 am

Try this:

=IF(NOT(D18=E18), "Not Equal", "Equal")

Slim
User avatar
CowboySlim
CD-RW Player
 
Posts: 1868
Joined: Tue Jan 28, 2003 3:58 pm
Location: Huntington Beach, CA

Postby VEFF on Tue May 04, 2004 11:36 am

Not to worry, it was because of the leading and trailing spaces
not matching up.
TRIM did the trick.

Thanks anyway!
Burners only:
Pioneer DVR-115D
Pioneer DVR-111D
Plextor PX-716A TLA0304
Plextor PX-716A same TLA

LiteOn 52246S 52X CD-RW
LiteOn 52246S (another)
LiteOn 52327S 52X CD-RW
TDK 40X USB 2.0 CD-RW
TEAC CD-W540E 40X CD-RW
User avatar
VEFF
CD-RW Player
 
Posts: 2025
Joined: Tue Jan 15, 2002 9:36 pm

Postby VEFF on Tue May 04, 2004 11:38 am

CowboySlim wrote:Try this:

=IF(NOT(D18=E18), "Not Equal", "Equal")

Slim


Thanks Slim!
I posted my reply above, without realizing you had replied already.

The problem turned out to be that the leading and trailing spaces were being counted, so there was never a match, since the two spreadsheets the values were copied into one from didn't have the EXACT same formatting.
Burners only:
Pioneer DVR-115D
Pioneer DVR-111D
Plextor PX-716A TLA0304
Plextor PX-716A same TLA

LiteOn 52246S 52X CD-RW
LiteOn 52246S (another)
LiteOn 52327S 52X CD-RW
TDK 40X USB 2.0 CD-RW
TEAC CD-W540E 40X CD-RW
User avatar
VEFF
CD-RW Player
 
Posts: 2025
Joined: Tue Jan 15, 2002 9:36 pm

Postby CowboySlim on Tue May 04, 2004 2:17 pm

Sometimes copy and paste bring trailing characters into Excel that you don't see, like copy and paste from a cell in a Word document table. That's right then you have to do a character count and a trim, or sometimes I use Right or Left function.

Slim
User avatar
CowboySlim
CD-RW Player
 
Posts: 1868
Joined: Tue Jan 28, 2003 3:58 pm
Location: Huntington Beach, CA


Return to The Beer Garden

Who is online

Users browsing this forum: No registered users and 0 guests

All Content is Copyright (c) 2001-2017 CDRLabs Inc.