Import Macro
Maybe you can pick out a column that always has data (the name field???):
dim LastRow as long
with worksheets("sheet1")
lastrow = .cells(.rows.count,"A").end(xlup).row
.range("a1:x" & lastrow).copy _
destination:=....
end with
dannykuk wrote:
Hi
This one currently has me stumped wonder if anyone can help.
Basically i am involved in a project where a number of business units will
be sending in headcount figures in a predesigned template. What i then want
to do is amalgamate these into individual tabs on a master sheet.
So for each unit they will be sending a list of employees along with other
information then under this list are a number of tables which perform various
calculations with the data.
I want to write a Macro that automatically imports this data as there are
over 20+ business units the problem is that each business unit has a
different number of staff so if i were perform it manually i would do a copy
then insert copied cells but if i am doing this automatically how will it
know how many cells to select??
--
Dave Peterson
|