Excel Formula/Macro

G

ginger

Hi, does anyone know how you can create a formula/macro for a template in
excel in that every time it opens it will give you a new number, ie, You
start with say 2990 for the first time and then for every time this sheet is
opened afterwards it will assign a new number and count upwards so it will go
to 2991 and then 2992 and so on? Any ideas would be greatly appreciated
 
J

JE McGimpsey

ginger said:
Hi, does anyone know how you can create a formula/macro for a template in
excel in that every time it opens it will give you a new number, ie, You
start with say 2990 for the first time and then for every time this sheet is
opened afterwards it will assign a new number and count upwards so it will go
to 2991 and then 2992 and so on? Any ideas would be greatly appreciated

See

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

ginger

Hi Thank you for your link. I am a little confused as I have never had to
write code before. I am finding it difficult to follow the code, as using
the registry has code section for date. Is there a simpler way to input a
macro for it to add a new sequential number to a new delivery note every time
it is opened from the template folder? Many thanks for your help.
 
C

Carl Witthoft

Well, the real answer is to use a database or forms software package and
link whatever absolutely has to be in excel into the database.

McGimpsey's solution is very inventive, but it's still a risky kludge.
 
J

JE McGimpsey

Carl Witthoft said:
but it's still a risky kludge.

While I agree that a database app is generally a better option for
critical operations, there's nothing particularly risky about using the
technique(s). The code operates consistently, predictably and reliably.

The bigger problem, of course, is using XL for *any* critical
recordkeeping, given the difficulty of preventing inadvertent corruption
of data and formulae.
 

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