Count duplicated values based as one, based on cell value in another column.

winds

Board Regular
Joined
Mar 9, 2022
Messages
69
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
Hello. So right now I have Column G using this formula =SUMPRODUCT((G2:G232<>"")/COUNTIF(G2:G232,G2:G232&"")) which works great to getting the total number, regardless it has duplicates.. Example if Column G has A,B,B,C,D,D,D,E, the total values in that column are 5 as the B's and D's are counted as one.

Now my problem is I want to expand on this formula where it must be based on another column.. say Column H. Example column H has 1 next to A in column G, or 2 next to C in column G.. combing the two columns together will be something like this

A1, B1, B2, C2, D3, D1, D1, D4, E1

And I want to know how many values there are but related to column H. For example if we focus on 1, column G should return 3 only, 2 should return 1, 3 should return 1 and 4 should return 1.

I imagine I would need to add 'COUNTIF' or 'MATCH' to the formula I am currently using but this where I got stuck... tried playing around with it but still can't get what I am looking for..
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
The easiest way I think, is just to make a helper column, by merging/concatenating Column G&H (=G1&H1) and then use your original formula on this new column.

/Skovgaard
 
Upvote 0

Forum statistics

Threads
1,214,904
Messages
6,122,169
Members
449,070
Latest member
webster33

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