Don, what is the difference between finding the last row as you are doing
here, lRow = cells(rows.count,"AG4").End(xlUP).Row, and as I usually do, like
this:
LstRow = [F65000].End(xlUp).Row? I see this method all the time, so it is
what I use in all my macros. Are there situations where your method would be
better? And if so, why? Just trying to understand. Thank you.
Greg
"Don Guillett" wrote:
>
> spaces??
> maybe
> '>>lRow = Range("AG4").End(xlDown).Row
> lRow = cells(rows.count,"AG4").End(xlUP).Row
>
> --
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
> (E-Mail Removed)
> "Kell2604" <(E-Mail Removed)> wrote in message
> news:8D89E34F-AD23-4B4A-B480-(E-Mail Removed)...
> > Hi Guys,
> >
> > I need some assistance with a macro. I need the macro to grab some
> > formulas
> > from a static range of cells (B2 - G2) and paste that formula in a static
> > range (B4 - G4) and then I need it to autofill to the last empty row (the
> > end
> > of this range is always changing or else I would use a static end range).
> > For example, today I might need it to fill all the way to B36 - G36 and
> > tomorrow I might need it to fill to B77 - G77. The end of the range is
> > determined by the column immediately preceeding the formulas. In my
> > example
> > above A36 or A77.
> >
> > A B C D E F G H
> > 1 x formulas............
> > 2 x fill formulas........
> > 3 x fill formulas........
> > 4
> > 5
> > 6 x end formula fill....
> > 7
> > 8
> > 9
> > The copy and paste section of the macro is working fine, it's the autofil
> > to
> > an always changing end row that I'm having trouble with. Hope this makes
> > sense.
> >
> > This is what I have been using...maybe I'm not even close...
> >
> > lRow = Range("AG4").End(xlDown).Row
> > Range("AH4").AutoFill Destination:=Range("AH4:AM" & lRow)
> >
> > Thanks as always for your help!!
> > Kelley
>
>