ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel Key Field option? (https://www.excelbanter.com/excel-worksheet-functions/6382-re-excel-key-field-option.html)

Nicki Nixon

Excel Key Field option?
 
so... how do you do it manually? I am searching for the same thing.

Nicki

"Frank Kabel" wrote:

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

--
Regards
Frank Kabel
Frankfurt, Germany

"sprice" schrieb im Newsbeitrag
...
Is there a key field option in Excel like there is one in Access




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


--
Regards
Frank Kabel
Frankfurt, Germany


Nicki Nixon wrote:
so... how do you do it manually? I am searching for the same thing.

Nicki

"Frank Kabel" wrote:

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

--
Regards
Frank Kabel
Frankfurt, Germany

"sprice" schrieb im Newsbeitrag
...
Is there a key field option in Excel like there is one in Access


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.



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



All times are GMT +1. The time now is 03:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com