Compare 1 column 2 rows

imraja12

New Member
Joined
Aug 29, 2017
Messages
5
New to excel and I can not fit this out.

I have a sheet that have a single column with data in rows which I need to match if 2 items are common.

Example:

ABCDEFG
1Invoice #Sold ByCustomerProduct SKUProduct NameQtyContract #
2W1404IN1431Rep1John SmithCLVZRB000069New Activation (Rate Plan Rebate)1 161576959
3W1404IN1431Rep1John SmithCLVZNS000064Prepaid Activation Rate Plan1161576959
4W1404IN1431Rep1John SmithCLVZRB002625Prepaid - Smart1161576959
5W1404IN1431Rep1John SmithCLVZNS000032Customer Owned Device (START PAW)1161576959
6W1404IN1296Rep2Smith DoeCLVZRB000069New Activation (Rate Plan Rebate)1160533955
7W1404IN1296Rep2Smith DoeCLVZNS000064Prepaid Activation Rate Plan1160533955
8W1404IN1296Rep2Smith DoeCLVZRB002625Prepaid - Smart1160533955
9W1404IN1296Rep2Smith DoeCLVZLG002605LG OPTIMUS ZONE 31160533955

<tbody>
</tbody>


I would like it to display "Prepaid CPE" if E4&E5 of contract# 161576959 match. Contract #160533955 wouldn't do anything since "Customer Owned Device (START PAW) is not found in that grouping.

Thanks anyone for help.

Common items linking would be contract# or Invoice#
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Here's one way

=IF(SUMPRODUCT((G2=G$2:G$9)*((E$2:E$9="Prepaid - Smart")+(E$2:E$9="Customer Owned Device (START PAW)")))=2,"CPE","")
 
Last edited:
Upvote 0
Here's one way

=IF(SUMPRODUCT((G2=G$2:G$9)*((E$2:E$9="Prepaid - Smart")+(E$2:E$9="Customer Owned Device (START PAW)")))=2,"CPE","")


Thanks that worked but the issue I am having is its returning "CPE" next to each cell where I have the contract number since that contract number is in 4 places. Can I only get it to display one next to any 1 of the group of contract number. Also the second is Prepaid - Smart is just one 4 items, can I just add if(and to the 1st part of ((E$2:E$9="Prepaid - Smart) with additional items? .
 
Upvote 0
"Can I only get it to display one next to any 1 of the group of contract number."
And the one you want to display against is...?

"can I just add if(and to the 1st part of ((E$2:E$9="Prepaid - Smart) with additional items?"
What are ALL the values you want to compare for the "Prepaid" items, I don't want to waste time guessing them.
 
Last edited:
Upvote 0
"Can I only get it to display one next to any 1 of the group of contract number."
And the one you want to display against is...?

"can I just add if(and to the 1st part of ((E$2:E$9="Prepaid - Smart) with additional items?"
What are ALL the values you want to compare for the "Prepaid" items, I don't want to waste time guessing them.


Sorry. Only next to the one that states Customer Owned Device (START PAW) so in that example only next to G5.

The other pairs could be

Prepaid - Basic & Customer Owned Device (START PAW)

or

Prepaid - iPad & Customer Owned Device (START PAW)

or

Prepaid - iPhone & Customer Owned Device (START PAW)

or


Prepaid - MBB & Customer Owned Device (START PAW)

or

Prepaid - Smart & Customer Owned Device (START PAW)

or

Prepaid - Tablet & Customer Owned Device (START PAW)

<colgroup><col></colgroup><tbody>
</tbody>
<strike></strike>


Thanks.
 
Upvote 0
Sio anything that begins "Prepaid" ?

Try (untested)

=IF(AND(G2="Customer Owned Device (START PAW)",SUMPRODUCT((G2=G$2:G$9)*((LEFT(E$2:E$9,7)="Prepaid")+(E$2:E$9="Customer Owned Device (START PAW)")))=2),"CPE","")
 
Upvote 0

Forum statistics

Threads
1,216,075
Messages
6,128,657
Members
449,462
Latest member
Chislobog

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