Down or over a cell

DSNTNOENUF

New Member
Joined
Aug 3, 2015
Messages
32
I want to record a macro that helps me cycle through a list in column A. I thought I could start with a cell d5.... record a macro =a1 and then =a2 then clicking back into a1 and stopping the recording and it would be set to continue the pattern down the column, but I am not correct. Can anyone tell help me to accomplish this? Thank-you in advance.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Use a for... next loop to go thru the column

Code:
'this will find the last row in column A that has something in it
LastRow = ActiveSheet.Cells(ActiveSheet.Rows.Count, "A").End(xlUp).Row

'this will loop thru all the cells in the column that have something in it.
For i = 5 To LastRow
      'Use "Cells(i, 1)" instead of "Range("A1")" for whatever the recorded macro 
      'does in that cell and each time it loops, it will increment i.
Next
 
Upvote 0
I want to record a macro that helps me cycle through a list in column A. I thought I could start with a cell d5.... record a macro =a1 and then =a2 then clicking back into a1 and stopping the recording and it would be set to continue the pattern down the column, but I am not correct. Can anyone tell help me to accomplish this? Thank-you in advance.
What exactly are you trying to achieve? That is, what is the result that you are trying to produce?
 
Upvote 0
I would like to look at a record, click on an inserted button that is assigned to a macro, and have that macro advance the record one row down.

I see the above code posted by portews and just haven't been able to paste it into vba and get it to work for me.

If anyone is aware of a step by step youtube on the subject and would be so kind as to post the link I would very much appreciate it.
 
Upvote 0

Forum statistics

Threads
1,215,537
Messages
6,125,389
Members
449,222
Latest member
taner zz

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