Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
filling down to the end of a data set automatically
I am trying to move large quantities of information between two programs and
their only common format is Excel. However, the formatting of the cells is different and I want to create a macro that fixes the formatting since this will be done a lot. The problem is that I need to add a few columns. I am currently dragging down to fill in the cells but the problem is that I don't know the length of the file that the macro is working on. I need it to fill down through the same row that the rest of the data ends at. The cells in the columns being filled down each have the same word in them. Is there a way that I can do this in the macro? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
filling down to the end of a data set automatically
Here is a simple example. Say we have data in column A and a formula or
constant in B1 and we want to autofill column B down to match column A: Sub AutoFilll() n = Cells(Rows.Count, "A").End(xlUp).Row Range("B1").AutoFill Destination:=Range("B1:B" & n) End Sub -- Gary''s Student - gsnu200848 "eklem" wrote: I am trying to move large quantities of information between two programs and their only common format is Excel. However, the formatting of the cells is different and I want to create a macro that fixes the formatting since this will be done a lot. The problem is that I need to add a few columns. I am currently dragging down to fill in the cells but the problem is that I don't know the length of the file that the macro is working on. I need it to fill down through the same row that the rest of the data ends at. The cells in the columns being filled down each have the same word in them. Is there a way that I can do this in the macro? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
filling down to the end of a data set automatically
Thank you. I have something working now.
"Gary''s Student" wrote: Here is a simple example. Say we have data in column A and a formula or constant in B1 and we want to autofill column B down to match column A: Sub AutoFilll() n = Cells(Rows.Count, "A").End(xlUp).Row Range("B1").AutoFill Destination:=Range("B1:B" & n) End Sub -- Gary''s Student - gsnu200848 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Filling Data automatically | Excel Discussion (Misc queries) | |||
filling in data automatically | Excel Discussion (Misc queries) | |||
Filling a cell automatically when data is put in another cell. | Excel Worksheet Functions | |||
Automatically Filling In Corresponding Data from Another Worksheet | Excel Discussion (Misc queries) | |||
Automatically filling in data | Excel Discussion (Misc queries) |