Adding Letters & Numbers for Code

bigmacneb

Board Regular
Joined
Jul 12, 2005
Messages
93
I need to paste information in every other cell, I figure the easiest way to do this is manually write out D3, D5, D7...through D500. Am I right in thinking that is the easiest way? If so how can I have a formula to add 2 to the previous D in order to avoid typing it in 250 times?
Thanks All.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Post back & be a bit more explicit about exactly what you are trying to achieve & the results you need... should have to do something like that manually...
 
Upvote 0
I have a very long macro. Inside this macro I need to copy one cell and paste it to every other cell within that column. As of right now I have written it like this:
Range("D5,D7,D9,D11,D13,D15,D17,D19,D21,D23,D25,D27,D29,D31,D33,D35,D37,D39,D41,D43,D45,D47,D49").Select
ActiveSheet.Paste

This works, however I need to get to D499, I'd rather not sit here and type it out 250 times, so I figure I could have a formula which adds 2 to the previous cell. I would do this on a separate sheet and then be able to paste it into this macro.
 
Upvote 0
Does this help?

Code:
Dim i As Integer

'your code
For i = 5 To 500 Step 2
    ActiveSheet.Paste Destination:=Range("D" & i)
Next i
Application.CutCopyMode = False
 
Upvote 0

Forum statistics

Threads
1,203,316
Messages
6,054,702
Members
444,742
Latest member
jmartin9247

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