ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Loop a macro (https://www.excelbanter.com/excel-programming/322687-loop-macro.html)

Steve[_71_]

Loop a macro
 
I am looking to make this macro run all the way to cell 1000.I would need the
next series to start at A7. Can someone please help?

Thanks,
Steve

Steve[_71_]

Loop a macro
 
UUUmmm....Yeah. I have no explanation for that. Here at last is the macro:
Sub Format()
'
' Format Macro
' Macro recorded 2/8/2005 by sgauer
'

'
Range("A5:P6").Select
Range("P6").Activate
Selection.UnMerge
Range("F5:L5").Select
Range("L5").Activate
Selection.Cut Destination:=Range("J5:P5")
Range("E6").Select
Selection.Cut Destination:=Range("I5")
Range("I5").Select
Selection.Cut Destination:=Range("H5")
Range("H5").Select
Range("H5").Select
Selection.Cut Destination:=Range("I5")
Range("E5").Select
Selection.Cut Destination:=Range("H5")
Range("D6").Select
Selection.Cut Destination:=Range("G5")
Range("D5").Select
Selection.Cut Destination:=Range("F5")
Range("C6").Select
Selection.Cut Destination:=Range("E5")
Range("C5").Select
Selection.Cut Destination:=Range("D5")
Range("B5").Select
Selection.Cut Destination:=Range("C5")
Range("A6").Select
Selection.Cut Destination:=Range("B5")
Range("A7").Select
End Sub


"Steve" wrote:

I am looking to make this macro run all the way to cell 1000.I would need the
next series to start at A7. Can someone please help?

Thanks,
Steve


Tom Ogilvy

Loop a macro
 
I doubt many people are going to try to decipher what you are doing.
Explain what steps you want to perform.

Then again, I could be wrong.

--
Regards,
Tom Ogilvy



"Steve" wrote in message
...
UUUmmm....Yeah. I have no explanation for that. Here at last is the macro:
Sub Format()
'
' Format Macro
' Macro recorded 2/8/2005 by sgauer
'

'
Range("A5:P6").Select
Range("P6").Activate
Selection.UnMerge
Range("F5:L5").Select
Range("L5").Activate
Selection.Cut Destination:=Range("J5:P5")
Range("E6").Select
Selection.Cut Destination:=Range("I5")
Range("I5").Select
Selection.Cut Destination:=Range("H5")
Range("H5").Select
Range("H5").Select
Selection.Cut Destination:=Range("I5")
Range("E5").Select
Selection.Cut Destination:=Range("H5")
Range("D6").Select
Selection.Cut Destination:=Range("G5")
Range("D5").Select
Selection.Cut Destination:=Range("F5")
Range("C6").Select
Selection.Cut Destination:=Range("E5")
Range("C5").Select
Selection.Cut Destination:=Range("D5")
Range("B5").Select
Selection.Cut Destination:=Range("C5")
Range("A6").Select
Selection.Cut Destination:=Range("B5")
Range("A7").Select
End Sub


"Steve" wrote:

I am looking to make this macro run all the way to cell 1000.I would

need the
next series to start at A7. Can someone please help?

Thanks,
Steve




Steve[_71_]

Loop a macro
 
When I copy the information and paste it into excel, it pastes as 2 rows. I
want to convert it into 1 row of information.
2 rows (5 and 6)
Row 5: 759646 <blank cell P: HENR KSJC KBOI
Row 6: JBSNAN N755TA S: DUNH 2/8/2005 05:45 2/8/2005 08:05
Row 6: Continued 2 15200 16300 15.8 31.7 21.4 02/08/2005



One row (5)
759646 JBSNAN N755TA P: HENR S:
DUNH KSJC 2/8/2005 05:45 KBOI 2/8/2005 08:05 2 15200 16300 15.8 31.7 21.4 2/8/2005

"Tom Ogilvy" wrote:

I doubt many people are going to try to decipher what you are doing.
Explain what steps you want to perform.

Then again, I could be wrong.

--
Regards,
Tom Ogilvy



"Steve" wrote in message
...
UUUmmm....Yeah. I have no explanation for that. Here at last is the macro:
Sub Format()
'
' Format Macro
' Macro recorded 2/8/2005 by sgauer
'

'
Range("A5:P6").Select
Range("P6").Activate
Selection.UnMerge
Range("F5:L5").Select
Range("L5").Activate
Selection.Cut Destination:=Range("J5:P5")
Range("E6").Select
Selection.Cut Destination:=Range("I5")
Range("I5").Select
Selection.Cut Destination:=Range("H5")
Range("H5").Select
Range("H5").Select
Selection.Cut Destination:=Range("I5")
Range("E5").Select
Selection.Cut Destination:=Range("H5")
Range("D6").Select
Selection.Cut Destination:=Range("G5")
Range("D5").Select
Selection.Cut Destination:=Range("F5")
Range("C6").Select
Selection.Cut Destination:=Range("E5")
Range("C5").Select
Selection.Cut Destination:=Range("D5")
Range("B5").Select
Selection.Cut Destination:=Range("C5")
Range("A6").Select
Selection.Cut Destination:=Range("B5")
Range("A7").Select
End Sub


"Steve" wrote:

I am looking to make this macro run all the way to cell 1000.I would

need the
next series to start at A7. Can someone please help?

Thanks,
Steve






All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com