Hi,
I need help creating a macro to generate a list of numbers for reports for another program will make. My list changes all the time. Basically I have a list of numbers that I need to combine into a list. The list is in a single excel column and I need to move the data, into a single cell. After moving the data it is separated by a semi colon and then I copy the next cell and put a semi colon behind that until I reach the end of the list. The list would look like this: 45611254:45661233;45667899
I recorded a macro to show what I am doing. I need to add in selecting a data range that includes however many cells I used and a "next" to keep copying until the end of the range. The macro is below.
If someone could help me do this I would be VERY grateful.
Thank you.
Todd
Sub Macro1()
'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+e
'
Range("A2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "21310001"
Range("E2").Select
ActiveSheet.Paste
ActiveCell.FormulaR1C1 = "21310001;"
Range("A3").Select
ActiveCell.FormulaR1C1 = "21315016"
Range("E2").Select
ActiveCell.FormulaR1C1 = "21310001;"
Range("A4").Select
ActiveCell.FormulaR1C1 = "21315017"
Range("E2").Select
ActiveCell.FormulaR1C1 = "21310001;21315016;21315017"
Range("E3").Select
End Sub
Bookmarks