Adding and repeating

swilkie

New Member
Joined
Jun 1, 2015
Messages
2
I was wondering if anyone knew how to have a macro take a numbered field, add +1 to the number, and then have a separate field where a number can be added that would then repeat that function a certain number of times.

Example: Field A1 has 57, and Field B1 has 5. End result would be that Field A1 counted up to 62 by ones, and other functions can be added to the macro such as printing and things. (this part I have figured out)

Any help would be greatly appreciated. Current macro is tedious to work through.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hello,

something like this?

Code:
Sub ADD_TO_CELL_A1()
    For MY_COUNT = 1 To Range("B1").Value
        Range("A1").Value = Range("A1").Value + 1
    Next MY_COUNT
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,901
Messages
6,122,157
Members
449,068
Latest member
shiz11713

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top