Compare Two Pairs of Cells and Mark Rows with Matches

bzowk

New Member
Joined
Aug 8, 2013
Messages
9
Hey Guys -

I have two worksheets which each have about 6 columns. Examples below...

Worksheet #1 Example (Original)
A B C D E F G
PCModel1 PCManufacturer1 Value Storage CPU Link1 Link2
PCModel2 PCManufacturer1 Value Storage CPU Link1 Link2
PCModel3 PCManufacturer2 Value Storage CPU Link1 Link2
PCModel4 PCManufacturer1 Value Storage CPU Link1 Link2
...

Worksheet #2 Example (Original)
A B C D E
PCModel2 PCManufacturer2 2gbRAM Storage CPU
PCModel3 PCManufacturer1 4gbRAM Storage CPU
PCModel6 PCManufacturer2 2gbRAM Storage CPU
PCModel8 PCManufacturer1 4gbRAM Storage CPU
...

What I'm needing overall is Link2 from G on Worksheet #1 for each matching PCModel & Manufacturer (Columns A+B on Worksheet #2 ) which has 2gb of RAM.

To start, I've already removed all rows from WS#2 which were not 2gb of RAM to produce the below:

Worksheet #2 Example (1st Modification)
A B C D E
PCModel2 PCManufacturer2 2gbRAM Storage CPU
PCModel6 PCManufacturer2 2gbRAM Storage CPU
...

I then copied columns A+B from WS#2 into columns H+I in WS#1 so that they are all in a single worksheet like the below:

New Combined Worksheet Example
A B C D E F G H I
1 PCModel1 PCManufacturer1 Value Storage CPU Link1 Link2 PCModel2 PCManufacturer1
2 PCModel2 PCManufacturer1 Value Storage CPU Link1 Link2 PCModel6 PCManufacturer2
3 PCModel3 PCManufacturer2 Value Storage CPU Link1 Link2 PCModel5 PCManufacturer1
4 PCModel4 PCManufacturer1 Value Storage CPU Link1 Link2 PCModel2 PCManufacturer1

Now I'm just needing to have Excel do the below which is where I'm stuck...
- Search columns A+B for a match of H1+I1
- If match found, add the text "Match" into a new column (J) on the matching row
- Repeat last two steps for H2+I2 and so on until complete

Example of Desired Result
A B C D E F G H I J
1 PCModel1 PCManufacturer1 Value Storage CPU Link1 Link2 PCModel2 PCManufacturer1
2 PCModel2 PCManufacturer1 Value Storage CPU Link1 Link2 PCModel6 PCManufacturer2 Match
3 PCModel3 PCManufacturer2 Value Storage CPU Link1 Link2 PCModel5 PCManufacturer1
4 PCModel5 PCManufacturer1 Value Storage CPU Link1 Link2 PCModel2 PCManufacturer1 Match

If I can get it to do that, I'll be able to filter the list to get the links I need for rows with "Match" in column J

An suggestions? Thanks!
 
Last edited:

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi,

This does what you described; however, your sample results does Not seem correct, unless I'm misunderstanding something:


Book1
ABCDEFGHIJ
1PCModel1PCManufacturer1PCModel2PCManufacturer1Match
2PCModel2PCManufacturer1PCModel6PCManufacturer2
3PCModel3PCManufacturer2PCModel5PCManufacturer1Match
4PCModel5PCManufacturer1PCModel2PCManufacturer1Match
Sheet433
Cell Formulas
RangeFormula
J1=IF(COUNTIFS(A$1:A$4,H1,B$1:B$4,I1),"Match","")


Formula copied down.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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
Back
Top