Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro help
Hi, i need a macro to drag down some cells till the last active cell in "G"
column. Ex: M N O 08:00:00 12:30:00 08:30:00 I need to select M1:O1 and to drag down till the last cell with some data in column "G". Can this be done? Thanks! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro help
Hi,
Try this Sub FillUp() Dim x As Long lastrow = Cells(Cells.Rows.Count, "G").End(xlUp).Row Range("M1:O1").AutoFill _ Destination:=Range("M1:O" & lastrow), Type:=xlFillDefault End Sub Mike "puiuluipui" wrote: Hi, i need a macro to drag down some cells till the last active cell in "G" column. Ex: M N O 08:00:00 12:30:00 08:30:00 I need to select M1:O1 and to drag down till the last cell with some data in column "G". Can this be done? Thanks! |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro help
Hi,
I meant Sub FillUp() Dim lastrow As Long lastrow = Cells(Cells.Rows.Count, "G").End(xlUp).Row Range("M1:O1").AutoFill _ Destination:=Range("M1:O" & lastrow), Type:=xlFillDefault End Sub Mike "Mike H" wrote: Hi, Try this Sub FillUp() Dim x As Long lastrow = Cells(Cells.Rows.Count, "G").End(xlUp).Row Range("M1:O1").AutoFill _ Destination:=Range("M1:O" & lastrow), Type:=xlFillDefault End Sub Mike "puiuluipui" wrote: Hi, i need a macro to drag down some cells till the last active cell in "G" column. Ex: M N O 08:00:00 12:30:00 08:30:00 I need to select M1:O1 and to drag down till the last cell with some data in column "G". Can this be done? Thanks! |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro help
Works perfect!
Thanks Mike! "Mike H" a scris: Hi, Try this Sub FillUp() Dim x As Long lastrow = Cells(Cells.Rows.Count, "G").End(xlUp).Row Range("M1:O1").AutoFill _ Destination:=Range("M1:O" & lastrow), Type:=xlFillDefault End Sub Mike "puiuluipui" wrote: Hi, i need a macro to drag down some cells till the last active cell in "G" column. Ex: M N O 08:00:00 12:30:00 08:30:00 I need to select M1:O1 and to drag down till the last cell with some data in column "G". Can this be done? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |