Help me make this Piece of VBA into something a little more elegant?
I'm envisioning something like:
Sub
Define
rows=(62,108,154,200)
//Notes
i=Row
j=Column
//
i = 16
j = 3
[FONT=wf_segoe-ui_normal, Segoe UI, Segoe WP, Tahoma, Arial, sans-serif]Cell(i,j).Select
Selection.Copy
For i=rows
Cell(i,j).Select
ActiveSheet.Paste
Endsub
INSTEAD OF THIS:
[/FONT]Range("C16").Select
Selection.Copy
Range("C62").Select
ActiveSheet.Paste
Range("C108").Select
ActiveSheet.Paste
Range("C154").Select
ActiveSheet.Paste
Range("C200").Select
ActiveSheet.Paste
Range("C246").Select
ActiveSheet.Paste
Range("C292").Select
ActiveSheet.Paste
[FONT=wf_segoe-ui_normal, Segoe UI, Segoe WP, Tahoma, Arial, sans-serif]
[/FONT]
I'm envisioning something like:
Sub
Define
rows=(62,108,154,200)
//Notes
i=Row
j=Column
//
i = 16
j = 3
[FONT=wf_segoe-ui_normal, Segoe UI, Segoe WP, Tahoma, Arial, sans-serif]Cell(i,j).Select
Selection.Copy
For i=rows
Cell(i,j).Select
ActiveSheet.Paste
Endsub
INSTEAD OF THIS:
[/FONT]Range("C16").Select
Selection.Copy
Range("C62").Select
ActiveSheet.Paste
Range("C108").Select
ActiveSheet.Paste
Range("C154").Select
ActiveSheet.Paste
Range("C200").Select
ActiveSheet.Paste
Range("C246").Select
ActiveSheet.Paste
Range("C292").Select
ActiveSheet.Paste
[FONT=wf_segoe-ui_normal, Segoe UI, Segoe WP, Tahoma, Arial, sans-serif]
[/FONT]