Generate customized sequential numbers with if formula

Sissi

New Member
Joined
Feb 17, 2018
Messages
2
Hello,

I have a sheet with some data that populate based on some formulas and i want to create a column that will be used for unique IDs (ideally incrementing) everytime new data is entered.

The IDs should be created thus:
=if(a1=“51321”,(char84)& “the auto generated number”, if(a1=53202,(char54)& “the next auto generated number”, “”).

Can anyone help with this, please?
I know a macro will be the ideal but i am not too familiar with the types of coding.

Thanks
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
How's this?

Code:
=IF(A1=51321,CHAR(84)&ROW(),IF(A1=53202,CHAR(54)&ROW(),""))
 
Last edited:
Upvote 0
How's this?

Code:
=IF(A1=51321,CHAR(84)&ROW(),IF(A1=53202,CHAR(54)&ROW(),""))

Hi JonXL and thanks a lot for your reply,

I did try and the cells increment but I guess what I omitted in my previous post is that if there are empty cells between the results, I would like the next cell with a result to pick-up from the last number.
Right now, with this formula, the first couple of rows are like this:

T7
T8
Result in next cell is ""
Result in next cell is ""
T11
T12
T13
Result in next cell is ""
Result in next cell is ""
H16

I would like that after the empty cell, let's say for the result in T11, it should actually be T9, an increment of the last cell with a data. Same thing for the results between T13 and H16.

I hope my explanation makes sense.

Thanks a lot.
 
Upvote 0

Forum statistics

Threads
1,214,650
Messages
6,120,736
Members
448,988
Latest member
BB_Unlv

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