happyhungarian

Active Member
Joined
Jul 19, 2011
Messages
252
Office Version
  1. 365
Platform
  1. Windows
Hi, I'm having difficulty getting a numbering scheme working correctly. I have a list of descriptions that I want to assign a number. If a certain description is used one time the number that gets assigned needs to be the same number that is used if that description shows up again later down the line. The following is an example description set, the formula used, the resulting "Numbering", and the issue highlighted. I need to do this all within the same column/cell but the problem is that this number is a subset of additional numbers so I can't have a trailing Vlookup to see if that description popped up before (because it will lookup the entire number not just this subset). I also can't have a separate reference section for a vlookup (which I was originally going to do).


DescriptionNumberingFormula for "Numbering"
A1SUMPRODUCT(1/COUNTIF(B$3:B3,B$3:B3&""))
B2SUMPRODUCT(1/COUNTIF(B$3:B4,B$3:B4&""))
C3SUMPRODUCT(1/COUNTIF(B$3:B5,B$3:B5&""))
C3SUMPRODUCT(1/COUNTIF(B$3:B6,B$3:B6&""))
C3SUMPRODUCT(1/COUNTIF(B$3:B7,B$3:B7&""))
4SUMPRODUCT(1/COUNTIF(B$3:B8,B$3:B8&""))<---"Blanks" accurately counted as a separate number
C4SUMPRODUCT(1/COUNTIF(B$3:B9,B$3:B9&""))<--- this should be "3"
D5SUMPRODUCT(1/COUNTIF(B$3:B10,B$3:B10&""))
E6SUMPRODUCT(1/COUNTIF(B$3:B11,B$3:B11&""))
C6SUMPRODUCT(1/COUNTIF(B$3:B12,B$3:B12&""))<--- this should be "3"

<tbody>
</tbody>
 
Last edited:
I wasn't sure how to deal with your blanks, so I put in a helper column C:

Code:
=IF(ISBLANK(A2)," ",A2)

Then, I used this formula in B2 and filled down:

Code:
=IF(COUNTIF(C$2:C2,C2)=1,MAX(B$1:B1)+1,INDEX(B$2:B2,MATCH(C2,C$2:C2,0),1))

Does that work?
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

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