LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA question - Running a autofil

Hello,
My question is if it is possible to program a VB script that ca
autofill all the cells.
I want to create a Pivot table, but the cells are not filled in all.
So for example in colom A there is Name: Erik in A2
Then A1 to A10 are empty but there should be Erik there to.
In B2 there is Sport And in C2 there is the actual sport name.
So The B2 name Sport should be extended further.
I used this code, but then I will have to select all the Ranges wit
hand and type it in.
Is there a way I can let the script run untill there is a filled i
cell and do so for all the coloms?

Range("C17").Select
Selection.AutoFill Destination:=Range("C17:C19"), Type:=xlFillCopy
Range("C17:C19").Select
Range("C21").Select


Range("D17").Select
Selection.AutoFill Destination:=Range("D17:D19"), Type:=xlFillCopy
Range("D17:D19").Select
Range("D21").Selec

--
Message posted from http://www.ExcelForum.com

 
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
simple question on formulas and autofil R1CHO Excel Worksheet Functions 1 April 1st 08 01:23 AM
question about some excel restriction script running on ... roise_r Excel Discussion (Misc queries) 0 March 30th 06 11:53 AM
question about some excel restriction script running on ... roise_r Excel Discussion (Misc queries) 0 March 30th 06 11:44 AM
Autofil a cell in the same row. Mac5 Excel Worksheet Functions 3 October 1st 05 12:34 AM
Filling cells (autofil?) in Excel 2003 Hnelg Excel Discussion (Misc queries) 3 July 5th 05 02:47 PM


All times are GMT +1. The time now is 10:09 PM.

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

About Us

"It's about Microsoft Excel"