Excel Key Field option?

F

Frank Kabel

Hi
if you mean a unique identifier. No there isn't. You can do this
manually but it is not the same as in Access
 
F

Frank Kabel

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
 
J

JE McGimpsey

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top