fixed length within the counta and some text

U

Uma Shanker

hello!
I would like to generate some incremental number if the cell on the right
is not empty
e.g. Order0001
Order0002
.....
Order0015

How I can do this with this formula ? How i can convert the output of counta
to have 4 digits?
=IF(D13<>"","Order"&COUNTA($D$4:D13)&"","")

thanks,
uma
 
U

Uma Shanker

Thanks,
Now another question.
lets suppose that I have another column with less data orders are within the
categories.

category name order nr. details
--------------------------------------
cat01 mycat order0001 xxxx
order0002 dsfsdf
cat02 yourcat order0003 dpppp
order0004 vvvvvv
order0005 bbbbb

I want to have order numbers having some category information also.
like cat01_order0001, cat02_order00003, cat02_order0004.

Basically, I must look into the column category, if the value is zero, then
look into upper column, till I find something.
thanks for any ideas,
uma
 
Top