LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 262
Default AutoIncrementing a Column like a database in Excel 2007

Hi,
This won't work for us because of relation ship issues. We will have 2
excel sheets Excel Sheet 2 with have a relational ID back to Excel Sheet 1.
So if you insert a row inbetween already generated numbers it will completely
throw off the relationship. Once a number is assigned in the A column it can
never change.

Thanks,
Keith

" wrote:

On Jul 24, 6:21 pm, keith wrote:
Hi,
We're going to use an SQLite database but we'd like to do all our data
entry in excel. Then we'd like to save the sheets as .csv files and import
the data into an SQLite database. For us to do this successfully we need to
be able to AutoIncrement an id field in Excel like a database would. Does
anyone know the best way to do this?

Thanks,
Keith


Try this...

Use Range A1 as your starting posistion and enter the following
formula...
=IF(LEN(B1)=0, "", 1)

In Range A2 and the rest of the other cells...
=IF(LEN(B2)=0, "", SUM(A1+1))

Copy the formula from Range A2 and paste all the way down the bottom
of the sheet... when you export the file out it will come out clean
like a database with an Access style primary key.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I modify a database in Excel 2007? j.cleland Excel Worksheet Functions 1 February 2nd 10 02:22 PM
Database argument in Excel 2007 I Teach Excel Worksheet Functions 0 January 18th 10 08:54 PM
Autoincrementing dates Andrew Chalk Excel Discussion (Misc queries) 5 April 6th 08 05:02 PM
Autoincrementing dates Andrew Chalk Excel Worksheet Functions 5 April 6th 08 05:02 PM
autoincrementing dde link David Barbe Excel Discussion (Misc queries) 6 June 25th 07 11:56 PM


All times are GMT +1. The time now is 10:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"