Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

comparing rows in an excel sheet 1

Status
Not open for further replies.

tonyvee1973

IS-IT--Management
Oct 22, 2009
156
GB
Hi All
A little help needed if possible?
I have a stocktake and data is being pushed into an excel sheet. Problem is that I need to be able to compare columns A, B and D between a row and the row underneath it - if they all match then put "Match" in an adjacent cell.
Some sample data below, any help really would be appreciated as going around in circles here.
Many thanks

demo_wgrd4n.jpg
 
HI,

[tt]
E3: =IF(AND(A2=A3,B2=B3,D2=D3),"MATCH","")
[/tt]
...copy/paste down.

BTW, posting a picture of a spreadsheet example is rude, IMNSHO. It FORCES other members who might want to help you, to painstakingly enter YOUR test data by hand. I wouldn't waste my time! In this instance, it was not necessary for me to do so. But I pass my opinion on to you, in order for you to consider making a better decision in the future if you care to do so.

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]
 
Thank Skip, works like a treat so much appreciated.
Huge apologies as didn't mean to appear disrespectful to you guys, just that I tried pasting in from an excel sheet and it pushed all the figures together - thought this may be a nightmare to read in the post. The image seemed much better but didn't think if the point you made. In future, what's the best way for me to paste data in from a table and keep the format?
 
Use TGML tag PRE

[ignore][PRE][/ignore]
[pre]
A B C D
1234 4564 4332 3442
ABC XY WW AB
[/pre]
[ignore][/PRE][/ignore]

Have fun.

---- Andy

There is a great need for a sarcasm font.
 
Just a quick update on this formula (Which works perfectly btw) :)
If I wanted to add a tolerance to the match (Instead of a perfect we will accept + or - 6pcs) how do I add this into the formula above?
I have tried =IF(AND(A3=A4,B3=B4,D3=D4)<=6,"MATCH","") but that doesn't work - sure I am missing something simple?
 
1) name one cell outside of your table Tolerance where the user can enter the desired tolerance.

2) =IF(AND(A3=A4,B3=B4,ABS(D3-D4)<=Tolerance),"MATCH","")

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]
 
Ah, so I wasn't a million miles away, need to read up on ABS :)
Thanks Skip, works like a charm as always, much appreciated - have a great weekend!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top