Count unique items in a row from a table

asokaw

New Member
Joined
Jun 24, 2013
Messages
39
Office Version
  1. 2013
I have to tables, In one one table I need to find out how many times an item exist, but if the item is in duplicate it should take it as 1
Refer the picture - I need to get the answers as shown in RED colour ( these were counted manually and entered )
 

Attachments

  • xl.jpg
    xl.jpg
    99.2 KB · Views: 18

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Try...

H4, confirmed with CONTROL+SHIFT+ENTER, and copied down:

=SUM(IF(MMULT(IF($C$4:$E$13=G4,1,0),TRANSPOSE(COLUMN($C$4:$E$13))^0)>0,1))

Hope this helps!
 
Upvote 0
It looks like the first result should actually be 8 since row 13 also contains "GAP"
Another option may be this

21 08 11.xlsm
CDEFGH
1
2
3
4GAPGAPVSGAP8
5VSM&SVSVS5
6GAPDIESELGAPM&S3
7GAPDIESELM&SDIESEL6
8GAPGAPDIESEL
9M&SVSDIESEL
10DIESELGAPVS
11DIESELGAPGAP
12GAPGAPGAP
13VSVSGAP
Count Rows
Cell Formulas
RangeFormula
H4:H7H4=SUMPRODUCT(--ISNUMBER(FIND("|"&G4&"|","|"&C$4:C$13&"|"&D$4:D$13&"|"&E$4:E$13&"|")))


BTW, I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with.
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,112
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