Is it possible to...

  • Thread starter Thread starter Microsoft
  • Start date Start date
M

Microsoft

Is it possible to populate a cell from a list of numbers (say on another
sheet) and taking the first number in that list too. Then, once that number
is used to delete that top number from the list so that next time the
template is run, you are in effect taking the next number.

i.e.

a list of numers on Sheet2 might be:

10001
10002
10003
etc

When I open the template Cell A1 might populate with the data: 1001 and then
delete 10001 from Sheet2 so that the list in Sheet2 now looks like:

10002
10003
etc

The trouble I see is that I am changing the template which wouldn't work
would it?

Basically I am creating an Invoice template which would need to have a
unique and incremental invoice number every time you create a new xls from
the template...

Hmmm

Sandem
 
Why not just have an auto_open or workbook_open macro that
[sheet1!a1] .value=[sheet1!a1]+1
 
Thanks for that.

What I have done in the end is to create a button for th user which
populates the Invoice Number cell from the previously mentioned list, the
macro then deletes the row so that the next number is in the A row (macros
are relative of course). The macro first copies the Invoice sheet so that
the original xls is kept 'clean'.

I have also created a macro that saves the file based on the data in the
invoice number cell. That way I get xls files saved as 10001.xls (nice and
easy to find the invoice if required). Also the original invoicing.xls file
is relatively safe from harm ;-)

Many thanks

Sandem




Don Guillett said:
Why not just have an auto_open or workbook_open macro that
[sheet1!a1] .value=[sheet1!a1]+1

--
Don Guillett
SalesAid Software
(e-mail address removed)
Microsoft said:
Is it possible to populate a cell from a list of numbers (say on another
sheet) and taking the first number in that list too. Then, once that number
is used to delete that top number from the list so that next time the
template is run, you are in effect taking the next number.

i.e.

a list of numers on Sheet2 might be:

10001
10002
10003
etc

When I open the template Cell A1 might populate with the data: 1001 and then
delete 10001 from Sheet2 so that the list in Sheet2 now looks like:

10002
10003
etc

The trouble I see is that I am changing the template which wouldn't work
would it?

Basically I am creating an Invoice template which would need to have a
unique and incremental invoice number every time you create a new xls from
the template...

Hmmm

Sandem
 
Back
Top