PC Review


Reply
Thread Tools Rate Thread

autofill empty cells with a macro in excel

 
 
=?Utf-8?B?V29sZmdhbmdQRA==?=
Guest
Posts: n/a
 
      29th Jun 2007
I have a macro set-up to copy information into columns A:K. This information
will change each time. There is a formula in L,M and N. I would like a macro
that would copy the formulas down to the final row of the info in column K.
Any suggestions?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      29th Jun 2007
Assume the formulas are in row 1

Sub ABC()
Dim rng as Range
Set rng = Cells(Rows.Count, "K").End(xlUp)
Range("L1:N1").AutoFill Range("L1:N1").Resize(rng.Row, 3)
End Sub

--
Regards,
Tom Ogilvy


"WolfgangPD" wrote:

> I have a macro set-up to copy information into columns A:K. This information
> will change each time. There is a formula in L,M and N. I would like a macro
> that would copy the formulas down to the final row of the info in column K.
> Any suggestions?

 
Reply With Quote
 
=?Utf-8?B?V29sZmdhbmdQRA==?=
Guest
Posts: n/a
 
      13th Jul 2007
Thanks Tom. That worked but is seems to copy the formula to one extra row.
Not a big deal. I'm just curious why.

"Tom Ogilvy" wrote:

> Assume the formulas are in row 1
>
> Sub ABC()
> Dim rng as Range
> Set rng = Cells(Rows.Count, "K").End(xlUp)
> Range("L1:N1").AutoFill Range("L1:N1").Resize(rng.Row, 3)
> End Sub
>
> --
> Regards,
> Tom Ogilvy
>
>
> "WolfgangPD" wrote:
>
> > I have a macro set-up to copy information into columns A:K. This information
> > will change each time. There is a formula in L,M and N. I would like a macro
> > that would copy the formulas down to the final row of the info in column K.
> > Any suggestions?

 
Reply With Quote
 
=?Utf-8?B?V29sZmdhbmdQRA==?=
Guest
Posts: n/a
 
      13th Jul 2007
Ok, I just figured it out. I have headers in row one so how can I subtract
one?

"WolfgangPD" wrote:

> Thanks Tom. That worked but is seems to copy the formula to one extra row.
> Not a big deal. I'm just curious why.
>
> "Tom Ogilvy" wrote:
>
> > Assume the formulas are in row 1
> >
> > Sub ABC()
> > Dim rng as Range
> > Set rng = Cells(Rows.Count, "K").End(xlUp)
> > Range("L1:N1").AutoFill Range("L1:N1").Resize(rng.Row, 3)
> > End Sub
> >
> > --
> > Regards,
> > Tom Ogilvy
> >
> >
> > "WolfgangPD" wrote:
> >
> > > I have a macro set-up to copy information into columns A:K. This information
> > > will change each time. There is a formula in L,M and N. I would like a macro
> > > that would copy the formulas down to the final row of the info in column K.
> > > Any suggestions?

 
Reply With Quote
 
=?Utf-8?B?V29sZmdhbmdQRA==?=
Guest
Posts: n/a
 
      1st Oct 2007
I am unable to figure this out. I have headers in row one. The formulas I
need copied don't start until row 2. Thanks!

"WolfgangPD" wrote:

> Ok, I just figured it out. I have headers in row one so how can I subtract
> one?
>
> "WolfgangPD" wrote:
>
> > Thanks Tom. That worked but is seems to copy the formula to one extra row.
> > Not a big deal. I'm just curious why.
> >
> > "Tom Ogilvy" wrote:
> >
> > > Assume the formulas are in row 1
> > >
> > > Sub ABC()
> > > Dim rng as Range
> > > Set rng = Cells(Rows.Count, "K").End(xlUp)
> > > Range("L1:N1").AutoFill Range("L1:N1").Resize(rng.Row, 3)
> > > End Sub
> > >
> > > --
> > > Regards,
> > > Tom Ogilvy
> > >
> > >
> > > "WolfgangPD" wrote:
> > >
> > > > I have a macro set-up to copy information into columns A:K. This information
> > > > will change each time. There is a formula in L,M and N. I would like a macro
> > > > that would copy the formulas down to the final row of the info in column K.
> > > > Any suggestions?

 
Reply With Quote
 
Mike Fogleman
Guest
Posts: n/a
 
      2nd Oct 2007
Sub ABC()
Dim rng As Range
Set rng = Cells(Rows.Count, "K").End(xlUp)
Range("L2:N2").AutoFill Range("L2:N2").Resize(rng.Row - 1, 3)
End Sub


Mike F
"WolfgangPD" <(E-Mail Removed)> wrote in message
news:42CF5953-DB6A-4260-B170-(E-Mail Removed)...
>I am unable to figure this out. I have headers in row one. The formulas I
> need copied don't start until row 2. Thanks!
>
> "WolfgangPD" wrote:
>
>> Ok, I just figured it out. I have headers in row one so how can I
>> subtract
>> one?
>>
>> "WolfgangPD" wrote:
>>
>> > Thanks Tom. That worked but is seems to copy the formula to one extra
>> > row.
>> > Not a big deal. I'm just curious why.
>> >
>> > "Tom Ogilvy" wrote:
>> >
>> > > Assume the formulas are in row 1
>> > >
>> > > Sub ABC()
>> > > Dim rng as Range
>> > > Set rng = Cells(Rows.Count, "K").End(xlUp)
>> > > Range("L1:N1").AutoFill Range("L1:N1").Resize(rng.Row, 3)
>> > > End Sub
>> > >
>> > > --
>> > > Regards,
>> > > Tom Ogilvy
>> > >
>> > >
>> > > "WolfgangPD" wrote:
>> > >
>> > > > I have a macro set-up to copy information into columns A:K. This
>> > > > information
>> > > > will change each time. There is a formula in L,M and N. I would
>> > > > like a macro
>> > > > that would copy the formulas down to the final row of the info in
>> > > > column K.
>> > > > Any suggestions?



 
Reply With Quote
 
=?Utf-8?B?V29sZmdhbmdQRA==?=
Guest
Posts: n/a
 
      2nd Oct 2007
Thanks Mike! I was trying to adjust the range. You just made my morning.
And quite possibly my whole week!

"Mike Fogleman" wrote:

> Sub ABC()
> Dim rng As Range
> Set rng = Cells(Rows.Count, "K").End(xlUp)
> Range("L2:N2").AutoFill Range("L2:N2").Resize(rng.Row - 1, 3)
> End Sub
>
>
> Mike F
> "WolfgangPD" <(E-Mail Removed)> wrote in message
> news:42CF5953-DB6A-4260-B170-(E-Mail Removed)...
> >I am unable to figure this out. I have headers in row one. The formulas I
> > need copied don't start until row 2. Thanks!
> >
> > "WolfgangPD" wrote:
> >
> >> Ok, I just figured it out. I have headers in row one so how can I
> >> subtract
> >> one?
> >>
> >> "WolfgangPD" wrote:
> >>
> >> > Thanks Tom. That worked but is seems to copy the formula to one extra
> >> > row.
> >> > Not a big deal. I'm just curious why.
> >> >
> >> > "Tom Ogilvy" wrote:
> >> >
> >> > > Assume the formulas are in row 1
> >> > >
> >> > > Sub ABC()
> >> > > Dim rng as Range
> >> > > Set rng = Cells(Rows.Count, "K").End(xlUp)
> >> > > Range("L1:N1").AutoFill Range("L1:N1").Resize(rng.Row, 3)
> >> > > End Sub
> >> > >
> >> > > --
> >> > > Regards,
> >> > > Tom Ogilvy
> >> > >
> >> > >
> >> > > "WolfgangPD" wrote:
> >> > >
> >> > > > I have a macro set-up to copy information into columns A:K. This
> >> > > > information
> >> > > > will change each time. There is a formula in L,M and N. I would
> >> > > > like a macro
> >> > > > that would copy the formulas down to the final row of the info in
> >> > > > column K.
> >> > > > Any suggestions?

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I want the autofill/drag function to skip empty cells tcmcgee Microsoft Excel Misc 1 28th Oct 2008 04:27 PM
How to Autofill empty cells in a column by previous data found =?Utf-8?B?RXJzbnQ=?= Microsoft Access 3 31st Aug 2006 05:23 AM
macro to colour empty cells (cells not recognized as empty) Gerben Microsoft Excel Programming 5 30th Jun 2005 03:29 PM
Re: AutoFill of empty cells Tom Ogilvy Microsoft Excel Programming 2 27th Dec 2004 08:51 PM
AutoFill of empty cells =?Utf-8?B?TWFyYw==?= Microsoft Excel Programming 0 22nd Sep 2004 02:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:11 AM.