Compare contents of two rows

JCScoobyRS

Board Regular
Joined
Sep 17, 2002
Messages
102
I need to be able to take two rows, let's say A and B, and see what numbers that aren't in A that are in B and numbers that are in B that aren't in A. How would you suggest doing this? A simple loop would work but does Excel do anything like this? Thanks, Jeremy
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

PaddyD

MrExcel MVP
Joined
May 1, 2002
Messages
14,234
having performed the comparison, what kind of result / output do you want? "...see what numbers..." isn't really specific enough - give an example.
 

JCScoobyRS

Board Regular
Joined
Sep 17, 2002
Messages
102
PaddyD,
I just need to know which values are in Column A that aren't in Column Be and vice versa. As far as the output...I really don't mind as long as the output would make sense. Thanks, Jeremy
 

JCScoobyRS

Board Regular
Joined
Sep 17, 2002
Messages
102
TryingToLearn,
Thanks. I will do some research myself too. Thanks, Jeremy
 

Yogi Anand

MrExcel MVP
Joined
Mar 12, 2002
Messages
11,454
JCScoobyRS said:
I need to be able to take two rows, let's say A and B, and see what numbers that aren't in A that are in B and numbers that are in B that aren't in A. How would you suggest doing this? A simple loop would work but does Excel do anything like this? Thanks, Jeremy
Hi JCScoobyRS:

I don't know the context in which you are trying to do this -- however, in the following illustration, I have not limited the comparison to numbers only -- I am going to compare both numeric and text entries. I am going to locate which non-blank entry in row 3 does not match any entry in row 2
y040222h1a.xls
ABCDEFGHIJ
2b237
30252a
410   6 0 10
5columnnumberwheretheentryinrow3doesnotmatchanentryinrow2
600   5 0 a
7entryinrow3inthedesignatedcolumnnumberdoesnotmatchanyentryinrow2
Sheet3


Would this do?
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,102
Messages
5,768,104
Members
425,454
Latest member
khoro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top