alwaysXcel
03-30-2005, 04:26 PM
This should be fairly simple, my brain is fried right now and I cant think of the simpler way:
How can I change the following code into a for loop or a loop?
'Ext- Destination Sheet
'Sheet7 - Target Sheet
'range("ExtRNG1")- predefined range in the target sheet with a given name
'range("ExtRNG2")-->("ExtRNG9") - same as above
I just need to copy each range and paste it in to the Ext sheet
Sub extvalue()
Sheets("Ext").Select
Range("E15").Select
Sheet7.Range("ExtRNG1").Copy
Selection.PasteSpecial (xlPasteValues)
Range("E65536").End(xlUp).Select
ActiveCell.Offset(1, 0).Select
Sheet7.Range("ExtRNG2").Copy
Selection.PasteSpecial (xlPasteValues)
Range("E65536").End(xlUp).Select
ActiveCell.Offset(1, 0).Select
Sheet7.Range("ExtRNG3").Copy
Selection.PasteSpecial (xlPasteValues)
Range("E65536").End(xlUp).Select
ActiveCell.Offset(1, 0).Select
end sub
Thank you!!!!! :bow:
How can I change the following code into a for loop or a loop?
'Ext- Destination Sheet
'Sheet7 - Target Sheet
'range("ExtRNG1")- predefined range in the target sheet with a given name
'range("ExtRNG2")-->("ExtRNG9") - same as above
I just need to copy each range and paste it in to the Ext sheet
Sub extvalue()
Sheets("Ext").Select
Range("E15").Select
Sheet7.Range("ExtRNG1").Copy
Selection.PasteSpecial (xlPasteValues)
Range("E65536").End(xlUp).Select
ActiveCell.Offset(1, 0).Select
Sheet7.Range("ExtRNG2").Copy
Selection.PasteSpecial (xlPasteValues)
Range("E65536").End(xlUp).Select
ActiveCell.Offset(1, 0).Select
Sheet7.Range("ExtRNG3").Copy
Selection.PasteSpecial (xlPasteValues)
Range("E65536").End(xlUp).Select
ActiveCell.Offset(1, 0).Select
end sub
Thank you!!!!! :bow: