#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 41
Default AutoFill

I would like a macro to be able to autofill a row when I import data. The
problem I'm facing, is the amount of rows will always be changing. I was
hoping there was a code that would fill until the end of the data. Any
suggestions would be appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default AutoFill

Autofill a row or column?

Sounds like the latter to me since part of description says "the amount of
rows will always be changing".

Do you want to fill down to end of data in an adjacent column?

What do you want to fill down with?

Let's say you entered a formula like =A1*B1 in C1 and wanted to fill down
as far as there was data in column B.

Sub Auto_Fill()
Dim lRow As Long
With ActiveSheet
lRow = .Range("B" & Rows.Count).End(xlUp).Row
.Range("C1:C" & lRow).FillDown
End With
End Sub


Gord Dibben MS Excel MVP

On Fri, 11 Dec 2009 11:34:01 -0800, dwake
wrote:

I would like a macro to be able to autofill a row when I import data. The
problem I'm facing, is the amount of rows will always be changing. I was
hoping there was a code that would fill until the end of the data. Any
suggestions would be appreciated.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
autofill scott Excel Worksheet Functions 2 September 10th 08 07:27 AM
Autofill DC Excel Discussion (Misc queries) 1 May 15th 08 02:51 PM
autofill grambo Excel Discussion (Misc queries) 1 October 9th 06 02:55 AM
Autofill? Amateur Excel Discussion (Misc queries) 3 September 9th 05 07:46 PM
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Excel Discussion (Misc queries) 1 June 17th 05 08:21 PM


All times are GMT +1. The time now is 05:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"