Consecutive numbers in 1 cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello!!
I´m trying to find a formula that changes the number in one cell, in a
consecutive way, using a macro button or every time the file is opened.

Example: The way a number of an invoice changes and doesn´t repeat itself
everytime you open the file or once you click on an assigned macro button!

Thank you in advance for your help.

Luis Miller.
 
Create a button and rightmouse, View Code
insert

Range("J19").Value = Range("J19").Value + 1

to add one to a number in cell J19

To create a button, in Excel, View, Toolbars and ensure Control Toolbox
is selected.
On that toolbar, click to enter Design Mode (that icon now becomes
'Exit Design Mode')
select Command Button and click in the required cell (say J20)

Add the code as in my first line, then Exit design mode.

You can later modify the buttons properties, usually the BackColour,
dropdown and select the left (colour) tab, and Caption.
 

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

Back
Top