I need to repeat a macro called "DTest" for a given range in a source spreadsheet which has 390 rows. "DTest" macro creates a new Excel file and transpose pastes the range and saves the file name with value in cell "B2" in a given path.
Sub RepeatDTest()
Range("1:1,2:2").Select
Selection.Copy
DTest
Range("1:1,3:3").Select
Selection.Copy
DTest
Range("1:1,4:4").Select
Selection.Copy
DTest
End Sub
My range includes row 1 as header, and rows from 2 to 390 as content in the new spreadsheet's row 2.
How to write a code for Range ("1:1,2:2"), Range ("1:1,3:3")....... Range ("1:1,390:390")?