Increase Cell Number By 1


Search Excel Forum Posts, Tutorials, Macros, Tips, and More
Hi anyone,
How could I wrote a code that would increase the cell "M10" value by number one each time the macro in run.
My sheets name is "Me". The cell format is in 0007/11
I want the code to change the number to 0008/11 when the macro is run.
Any help on this would be kindly appreciated.
Similar Excel Video Tutorials
Cell References Relative & Absolute
 The Excel Basics Series shows a systematic description of what Excel can do from beginning to end.
#8 Video topics:
1)Cell references in for ...
Increase & Decrease Math Problems
 See how to solve Increase and Decrease (Rate and Percentage) Business Math Word Application Problems.
Excel math formulas. Rate, Rate Of Change, ...
Helpful Excel Macros
Format Cells as Time in Excel
 This free Excel macro formats a selection of cells in the Time format in Excel. This Time number format means that inst
Similar Topics
Hi,
I'm having the following format in my excel sheet's cell N7.
0001 / 2011
How could I write a code that would increase the number by one each time I run the macro?
Let's say for example from 0001 / 2011 to 0002 / 2011.
Any help on this would be kindly appreciated.
Thanks in advance.
i am creating a basic stock control system in excel, the problem i have is with a macro that will increase the number in a cell each time it is clicked and at the moment it will increase the number too much, is there anyway that i can make it that the number will not increase or a message will be displayed if the number is going to go past a certain limit, i have put a screnshot in to make it easier to understand me
so the macro button will be going in cell F6, and what i want is it to increase the number in cell E6 by 1 each time it is clicked but i want a validation that the number cannot be greater than the number in D6, so they can't sell an item that they don't have in stock, and is there anyway an error message cnan be displayed when this happens
http://img253.imageshack.us/img253/9...eenshotyv5.jpg
thanks for any help in advance
Hi,
I have a price list XLS sheet. I would like to create a Macro that:
I will be able to choose the "prices list Column"
The Macro should search in each Cell in that Column until there is empty Cell.
IF it finds a $ sign before the price (like: $24) it should delete the $ sign.
IF it finds a number format like 27 it should change it to 27.00 . That the format of the number should be XX.XX (2 decimal after the point) (if it finds a number like 6.7 it will change it to 6.70)
IF it finds the text "CALL" or "call" it should replace it to 0 (zero)
After it finished this process, it allow me to "increase by percents" all the prices in that Column. If I don't input any number for "increase by percents" (empty value) then no "increase by percents" will be perform
If someone PLS could help I will be grateful !
Thanks A lot for the attention And Happy New Year to all of you !!
Regards,
Eli
I am currently using a print macro that when "clicked" on will print a set number of copies. As it prints it also counts up in sequence and this number is added to the sheet being printed out in two locations. One location is a number such as 4K0009N000. This number increases by one each time it prints. In a second location the same number will increase the same way but it is in barcode form. The trouble i am having is with the barcode number. I need to have the barcode number start with a letter such as S4K0009N000. The cell i have this number in wil increase as well but after the first print it drops the S off the beginning. Please see code below. Any help would be appreciated.
brandon
Sub Macro9()
Dim mycounter As Long
mycounter = 0
Do Until mycounter = 5
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
'change cell address below
With Range("AB57, AB58")
.Value = Left(.Value, 7) & Format(Right(.Value, 3) + 1, "000")
End With
mycounter = mycounter + 1
Loop
End Sub
I have the value for the numeric beginning sequence in cell AB57 and the numeric value for the Alpha begining sequence in AB58. Whichever value is in the AB57 cell is what the AB58 reverts back to after the initial print.
Thanks again
I am currently using a print macro that when "clicked" on will print a set number of copies. As it prints it also counts up in sequence and this number is added to the sheet being printed out in two locations. One location is a number such as 4K0009N000. This number increases by one each time it prints. In a second location the same number will increase the same way but it is in barcode form. The trouble i am having is with the barcode number. I need to have the barcode number start with a letter such as S4K0009N000. The cell i have this number in wil increase as well but after the first print it drops the S off the beginning. Please see code below. Any help would be appreciated.
brandon
Sub Macro9()
Dim mycounter As Long
mycounter = 0
Do Until mycounter = 5
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
'change cell address below
With Range("AB57, AB58")
.Value = Left(.Value, 7) & Format(Right(.Value, 3) + 1, "000")
End With
mycounter = mycounter + 1
Loop
End Sub
I have the value for the numeric beginning sequence in cell AB57 and the numeric value for the Alpha begining sequence in AB58. Whichever value is in the AB57 cell is what the AB58 reverts back to after the initial print.
Thanks again
I would like to increase the number each time i click the message box how should I do it?
Code:
Private Sub CommandButton1_Click()
Dim str As String
Dim number As Integer
str = Right(CStr(Cells(1, 4).Value), 1)
number = CInt(str)
MsgBox number
number = number + 1
End Sub
what i need is a macro to run when I print a form. I am making a job card with a unique number on it ie: 100. when I print the form, I then need the 100 to change to 101 and so on. I cant work this one out, any help would be great, thanks!
EDIT  Ive attached my work in progress. It is for a computer repair shop. I have a few macros in there as I need to email a copy of the workbook too.
when you open the workbook, you will see the job number in red. I just need a macro tht will increase that number +1 every time it runs.
I also need the email macro to rename the workbook to the customer name input in cell B4  but I think im best to post this request in a new thread?
Hope this helps
Premiums and Increments Amounts Layer Part Prop Premium Investment Premium
1 1 40 8
Original Premium 8 1 2 44 8
1st Increase 0.8 1 3 48.4 8
2nd Increase 0.88 1 4 53.2 8
3rd Increase 0.96 2 1 44 0.8
4th Increase 2 2 48.4 0.8
5th Increase 2 3 53.2 0.8
6th Increase 3 1 48.4 0.88
7th Increase 3 2 53.2 0.88
8th Increase 4 1 53.2 0.96
9th Increase
10th Increase
11th Increase
12th Increase
13th Increase
14th Increase
15th Increase
16th Increase
17th Increase
18th Increase
19th Increase
20th Increase
Number of Segments in policy 5
Hi Guys,
I wonder if any of you could help me with this spreadsheet from work (apologies I could not get the HTML excel uploader to work).
Basically, what I would like to happen is when the user enters the 'Original Premium' and 'increment amount' plus the 'number of segments in policy' the 'layer', 'part', 'prop premium' and 'investment premiums' are automatically generated.
I hope the example above gives you an idea of what I am after.
Please let me know if you need more info and I'll do my best to explain things further.
Thanks in advance for any help you can offer me.
Kenny
Hi
I have a spreadsheet which has individual part values, we now have had a price increase and I need to increase all the values by 1.3%. What is the easiest way as I dont want to increase the number of columns to copy and paste. I just want to increase the existing cells.
Thanks
I used the below code from a thread i found here to increase a number of a cell, but what i want to know is what to add/change so a specific cell only updates and i dont need to have clicked into that cell for it to work.
Basically I need cell D4 to increase by 1, but dont want to click the cell first.
Sub InvoiceIncrease()
Dim cell As Range
For Each cell In Selection
Select Case True
Case IsNumeric(cell) And cell.Value > 0
cell.Value = (cell.Value + 1)
End Select
Next
Application.ScreenUpdating = True
End Sub
Cheers
I didnt see a previous post that really helped, so I thought I would ask:
I have a form that I print and sent out. I need to add a request number that automatically increases each time it is opened. I dont need to worry about saving off each file individually. I open it, print it, hand fill in some info and send it off.
I want the number in cell J2 to increase by one each time I open it so I dont forget to change it.
I do not know vba programming but I know what the editor is and can copy code into it. I have only been using excel 2000 about a week.
I need to autofill with a number that will be different each time. I need that number to increase by one in a series to the right ranging from column B to V (like entering 171 and having it go across autofilling ending up with number 191.
I have searched internet extensively and the closest thing I have found is:
Sub ExtendDates()
Selection.AutoFill Destination:=ActiveCell.Range("A1:V1"), Type:= _
xlFillDefault
End Sub
I am not dealing with dates just numbers but this example had dates in it.
If I enter in a number in Column B this code will copy it across to Column V. But I need it to increase one number in each column for 21 columns. I need a macro like this because I have to do this around 400 times.
From what I have learned so far I think I need it to be relative because even though the columns are the same across (B to V) the row will change with a new number added each time.
Thanks,
Sperry
Looking for a way to increase or decrease the number of displayed decimals for any format (%, Curreny, Number) by using keyboard shortcuts or macros. I customized my toolbar to display the increase & decrease decimal place buttons but associating them in a macro also associates the specific number format with the changee.g. VBA states " Selection.NumberFormat = "0.00%" Any thoughts?
Looking for a way to increase or decrease the number of displayed decimals for any format (%, Curreny, Number) by using keyboard shortcuts or macros. I customized my toolbar to display the increase & decrease decimal place buttons but associating them in a macro also associates the specific number format with the changee.g. VBA states " Selection.NumberFormat = "0.00%" Any thoughts?
I need to be able to be able to select a cell and then have one keystroke incrimentally increase the number already displayed in the cell (i.e. if the cell I select already has the number 478 displayed in the cell, I want to hit the "+" sign and have the number displayed change to 479). Does anyone know how to do this or if there is a macro that I can download?
I have a pretty simple question I believe. I am just dumbfounded. I am trying to reference cells from another workbook and have them increase in number, but the cells I need to reference increase by multiples of 16 instead of 1. ex. 2,18,34,50, etc...
Here is an example of the formula I am using in cell B2:
=Genemapper!C2&","&Genemapper!D2&","&Genemapper!E2&","&Genemapper!F2&","&Genemapper!G2&","&Genemapper!H2&","&Genemapper!I2
In cell B3 I want the formula to be:
=Genemapper!C18&","&Genemapper!D18&","&Genemapper!E2&","&Genemapper!F18&","&Genemapper!G18&","&Genemapper!H18&","&Genemapper!I18
The simple click and drag to increase the number doesn't work. I would do this manually but I would have to do this about 80,000 times in my worksheet.
I am up for either a macro or just a formula. Thanks!
So I have a date and a day code (E.G. 1555), I'm currently using the =today() command for the day however I have to change the day code every day manually, is there a way for me to increase the day code (it can start from any number) by 1 every new day automatically??
Thanks
Pritesh
I am collating survey data in excel 2003 and its getting tedious. For every answer that is "agree" I enter "1", but if another person answers the question in the same way ("agree") I have to manually change that number from "1" to "2", and if it was answered again I would have to change it to "3".
I hope that made sense!
Anyway, I made a counter using VBA code but I need the cell I click on to increase/decrease in value by 1, not have a button that is linked to another cell other the spreadsheet will be too many and time consuming to build.
Is there a way to increase the numbers in a single cell just by clicking that cell or a button placed over it? And have that new number appear on the button?
Thanks in advance
Hi Everyone
I am desperately trying to figure out a formula that says
if one cell is more than 10% larger than the other then say increased, if it is more than 10% lower say decreased and if not say same ( Essentailly I only want to show change if it has been more that 10% in either direction.
this is my attempt that is not working !
=IF(E8D8<10%,"Increase",IF(E8D8>10%,"Decrease",IF(E8=D8,"Same",)))
With this formula I get these results, which i think are correct for the increase and desrease but if they are the same im getting 'increase'
100% 18% Increase
100% 100% Increase
100% 91% Increase
100% 82% Increase
70% 100% Decrease
100% 100% Increase
60% 82% Decrease
33% 73% Decrease
83% 73% Increase
33% 73% Decrease
100% 100% Increase
90% 100% 0
50% 100% Decrease
70% 100% Decrease
Plesae help Im driving myself nuts trying to use this formula. I have never been trained in Excel and learn as I go but this time i am confused !!!
Thank you
Claire
For our budgets, we want to have the option of entering either a whole number or a percentage for salary increases. I would like to have a drop down list in one cell (containing the options % Increase or $ Increase) and have the cell next to it change formats based on their entry. Summed up, if the user selects % Increase, I would like the open cell that they make their entry in formatted as a percentage. If they select $ Increase, I would like the open cell formatted as a currency amount. Is this possible?
Thanks.
Hi,
I am working on a spreadheet in which the numerical value in cell A1 are copied and pasted from another worksheet. The value can increase and decrease over time.
Also, the value may sometime have a negative value hence when the numerical number gets higher with a negative sign, its decreasing, and vice versa.
I would like to know if there is a way to change the cell colour based on the increase/decrease data (e.g. green when increase, red when decrease).
Is there anyway to create a counter, whereby I can click it and the value of a cell grows by one number each time?
What I'm doing is counting up responses made by customers. So, instead of manually changing, let's say 30 to 31, then manually change 31 to 32, and so on, can I click on something to make the number automatically increase by one number? What's happening is that at times, people manually change a number to one greater (i.e. 33 to 34) but they transpose the numbers (i.e. instead of 33 to 34, they change it from 33 to 44, or some other number by accident) without realizing it. If there was a counter we simply clicked on, that wouldn't happen! It would be really helpful if the counter would not need it's own cell, but that might be pushing it.
I hope this makes sense! I would love to be able to change the way these reports are set up. =)
~GSG
Hi Everyone
I am desperately trying to figure out a formula that says
if one cell is more than 10% larger than the other then say increased, if it is more than 10% lower say decreased and if not say same ( Essentailly I only want to show change if it has been more that 10% in either direction.
this is my attempt that is not working !
=IF(E8D810%,"Decrease",IF(E8=D8,"Same",)))
With this formula I get these results, which i think are correct for the increase and desrease but if they are the same im getting 'increase'
100% 18% Increase
100% 100% Increase
100% 91% Increase
100% 82% Increase
70% 100% Decrease
100% 100% Increase
60% 82% Decrease
33% 73% Decrease
83% 73% Increase
33% 73% Decrease
100% 100% Increase
90% 100% 0
50% 100% Decrease
70% 100% Decrease
Plesae help Im driving myself nuts trying to use this formula. I have never been trained in Excel and learn as I go but this time i am confused !!!
Thank you
Claire
I have two cells that contain the following numbers:
S4K000N000
4K000N000
These two cells are only different because of the S in front of the first one. These two cells are meant to increase by one each time the macro print is clicked. The problem i am running in to is that the first cell is overriding the value in the second cell. Instead of cell 1 printing with the S number format and cell 2 printing without the S, after the initial print the first cell changes the second cell to to reflect the same value which has the S in front of the numerical sequence. Please see code below, i am looking for the values in both cells to count up as required but to remain in the proper format.
Any help is appreciated.
Thanks,
Brandon
Sub Macro9()
Dim mycounter As Long
mycounter = 0
Do Until mycounter = 2
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
'change cell address below
With Range("AB57", "AB58")
.Value = Left(.Value, 7) & Format(Right(.Value, 3) + 1, "000")
End With
mycounter = mycounter + 1
Loop
End Sub
I have a column of cells, each with a different whole number. I want to increase that whole number in each of those cells by 1. I'm looking for a clever way to change them all at once, rather than changing the value in each cell one by one. This would be a onetime event in the spread sheet, not something that has to remain active. Thank you!