Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro help
Hi,
I created a macro for automating the input of a delimited text file. Once all the stuff is imported, I want to reformat some of the data. I have the formula ready, but have no clue how to make it apply to the whole column if I don't know ahead of time how many rows the column will contain. I can manually put it in the top cell and drag it down, but I want it to be part of the macro. How do I do this? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro help
Hi,
It would have helped to see the formula and where it is to go but this is one way lastrow = Sheets("Sheet1").Cells(Cells.Rows.Count, "A").End(xlUp).Row Range("B1").Formula = "=A1" Range("B1:B" & lastrow).FillDown Mike "jschping" wrote: Hi, I created a macro for automating the input of a delimited text file. Once all the stuff is imported, I want to reformat some of the data. I have the formula ready, but have no clue how to make it apply to the whole column if I don't know ahead of time how many rows the column will contain. I can manually put it in the top cell and drag it down, but I want it to be part of the macro. How do I do this? Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro help
It worked! Thanks so much.
"Mike H" wrote: Hi, It would have helped to see the formula and where it is to go but this is one way lastrow = Sheets("Sheet1").Cells(Cells.Rows.Count, "A").End(xlUp).Row Range("B1").Formula = "=A1" Range("B1:B" & lastrow).FillDown Mike "jschping" wrote: Hi, I created a macro for automating the input of a delimited text file. Once all the stuff is imported, I want to reformat some of the data. I have the formula ready, but have no clue how to make it apply to the whole column if I don't know ahead of time how many rows the column will contain. I can manually put it in the top cell and drag it down, but I want it to be part of the macro. How do I do this? 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 | |||
Need syntax for RUNning a Word macro with an argument, called from an Excel macro | Excel Programming | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |