View Single Post
  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Note that for this to work as a key field, entries have to be made in
sequential row order (which means that you might as well use

A1: =IF(B1<"",ROW(),"")

and copy down.

One essential element of key fields is that the key stays identified
with a record. Using the formula below will renumber the records if data
is entered out of order and then filled in, or if a row is inserted or
deleted.

For a true key field, I think you'd need to use an event macro to insert
a sequential number.



In article ,
"Frank Kabel" wrote:

Hi
in A1 enter
=IF(B1<"",1,"")

in A2 enter
=IF(B2<"",MAX($A$1:OFFSET(A2,-1,0))+1,"")
and copy this formula down for as many rows as required. Now everytime
someone enters data in column B column A shows a ID value