View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Macro to create next number in sequence to be used on 2 workbooks

An alternative would be to store the last used number in the registry or
a text file. See

http://www.mcgimpsey.com/excel/udfs/sequentialnums.html



In article ,
Peter wrote:

Hi all -

I have 2 workbooks (excel 2003) for tracking invoice numbers - which now run
alternate to each other - to avoid having to open both workbooks and having
to look at which was the last number used (to stop duplicate invoice number)
is it possible to create a simple macro that will look at both lists -
identifty last number used and then add 1 - putting this in the next
available cell. Hope this makes sense!

Simple layout of both workbooks:

Book 1 Book 2
A B A B
Date Invoice Number Date Invoice Number
1/10/08 12345 3/10/08 12346
6/10/08 ??? 5/10/08 12347