ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Consecutive numbers in 1 cell (https://www.excelbanter.com/excel-worksheet-functions/40251-consecutive-numbers-1-cell.html)

LMiller

Consecutive numbers in 1 cell
 
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.

Paul B

Luis, have a look here for ways to do it

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

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"LMiller" wrote in message
...
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.




Bryan Hessey


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.




LMiller Wrote:
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.



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=395477



All times are GMT +1. The time now is 08:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com