How to automatically generate the next logical number for a list in Excel

theBIMman

New Member
Joined
Feb 21, 2012
Messages
3
Hello,

I have a list of numbers, the list is not in order nor does the list always start with the same starting point. My need is to find the next logical number in the list (I've tried vlookup/max/index etc). The closest I got was a combination of max + 1 combined with vlookup. However, this applied the same next number to all blank cells when I'm wanting each new number to be added to the list before generating the next logical number.

Can anyone please give me some pointers? It would be greatly appreciated. A sample of the list is below.

Original List (must keep the alpha-numeric values in this list)I can generate the new Alpha code using a LEFT formula from another column of dataI'd like to be able to get the next logical number for the blanks in this list. I'm happy to add the leading 00's in front of the real number and have tried value, max, vlookup but am stuck
GAT
GAT001GAT001
GLA001GLA001
BLI001BLI001
BLI002BLI002
BLI004BLI004
BLI003BLI003
BLI
BLI005BLI005
BLI006BLI006
BLI
BLI
CON001CON001
CUR001CUR001
CUR
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Is this what you need?

Lookup problem.xlsx
ABC
1Original ListAlpha codenext number
2GAT002
3GAT001GAT001
4GLA001GLA001
5BLI001BLI001
6BLI002BLI002
7BLI004BLI004
8BLI003BLI003
9BLI007
10BLI005BLI005
11BLI006BLI006
12BLI008
13BLI009
14CON001CON001
15CUR001CUR001
16CUR002
Sheet8
Cell Formulas
RangeFormula
C2:C16C2=IF(A2="",TEXT(COUNTIF(A:A,B2&"*")+COUNTIFS(A$2:A2,"",B$2:B2,B2),"000"),RIGHT(A2,3))
 
Upvote 0

Forum statistics

Threads
1,214,385
Messages
6,119,205
Members
448,874
Latest member
Lancelots

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