View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default formula for automatic numbering the records

The OP did show consecutive numbers as part of the requirement:

if B8 is contains data A8 should be A6+1.


--
Regards,
Tom Ogilvy


"Jean-Yves" wrote in message
...
Hi Nikos,

It is not necessary to produce consecutive number IMHO, but to get an ID
number.
Your solution provides a variable ID if any entry is cleared. Note that my
solution does not works as well if a row is deleted. Should think of a
macro to write a unique value at run time.
Regards,

Jean-Yves

"Nikos Yannacopoulos" wrote in message
...
Taco,

I'm afraid I'll have to disagree with Jean-Yves. His solution won't

produce
consecutive numbers, it will skip numbers of rows with blank cells in

column
B.

Assuming your list of names starts in row 2, try this formula in A2,

then
copy down:

=IF(NOT(ISBLANK(B2)),COUNTA(B$2:B2),"")

If your list starts in a different row just paste the formula in column

A
in
that row, and change the 2's to the row number.

HTH,
Nikos

"taco" wrote in message
...
sure the way is so easy, but i'm a beginner who do not enough time to

try
and
solve.
problem is..

coloumn B contains names. coloumn A numbering the recorded names.
i would like to insert a formula for auto numbering.
for example if there is nothing in B7, A7 empty.
and if B8 is contains data A8 should be A6+1.

thanks in advance for your help.