| 1 WutUp WutUp, on Mar 20, 2009 12:08:19 am GMTYou want to fill a series of cells based upon the source range.
xlFillSeries instead of xlFillDefault
Try this instead:
Range("F1").AutoFill Destination:=Range("F1:F226"), Type:=xlFillSeries Reply to WutUp WutUp | 2 KT, on Mar 20, 2009 5:27:19 pm GMTThanks for your help. Do you know how I can make the Range be dynamic? (Instead of F1:F226 I want it to be F1:the last populated row in column F). (So instead of F226, which happens to be the last populated cell in column F for this file, I want it to always find the last populated cell in column F for that particular file.)
Thanks again! Reply to KT | 3 WutUp WutUp, on Mar 21, 2009 1:37:43 am GMTDim BtmRow As Long
Bottom = Sheets("Put the name of your sheet here").Range("F65536").End(xlUp).Row
Range("F1").Select
Selection.AutoFill Destination:=Range("F1:F" & Bottom), Type:=xlFillSeries Reply to WutUp WutUp | 4 KT, on Mar 21, 2009 3:36:34 am GMTExcellent! That's just what I needed. Thank you so much for your help! Reply to KT |
| 5 jimi, on Mar 31, 2009 2:24:22 am BSTHi,
Dim BtmRow As Long
Bottom = Sheets("Put the name of your sheet here").Range("F65536").End(xlUp).Row
Range("F1").Select
Selection.AutoFill Destination:=Range("F1:F" & Bottom), Type:=xlFillSeries
Instead of using XlFillSeries, what else can we use to have excel fill in at half increment?
eg: 0, 0.5, 1, 1.5, 2, 2.5, etc?
thanks heapss for helping Reply to jimi | 6 WutUp WutUp, on Mar 31, 2009 2:57:49 am BSTIf you are working in the same sheet (not between sheets), then you need to use a "Step" value.
Instead, of selecting one cell, select the first two.
So, if cell F1 contained 0.0, and cell F2 contained 0.5, select F1:F2 to create the step value.
Range("F1:F2").AutoFill Destination:=Range("F1:F226"), Type:=xlFillSeries Reply to WutUp WutUp | 7 jimi, on Mar 31, 2009 3:44:04 am BSTHi Wut,
I tried your method but have runtime error 1004
Autofill method of range class failed
here is my piece of code:
Range("G3").Select
ActiveCell.Value = "0"
Range("G3").Value = "0"
Range("G4").Value = "0.5"
Range("G3:G4").AutoFill Destination:=Range("G5:G18"), Type:=xlFillSeries
Please help...thanks Reply to jimi | 8 WutUp WutUp, on Mar 31, 2009 10:25:16 am BSTYour destination range has to include the starting cell.
Range("G3").Value = "0"
Range("G4").Value = "0.5"
Range("G3:G4").AutoFill Destination:=Range("G3:G18"), Type:=xlFillSeries Reply to WutUp WutUp |
|
|
|
|
|
| Hi, i am looking for a macro which will add a column to my sheet and fill a code which is related with my excel file name, i mean to say that suppose there is a file name test which is save in my desktop and i want to open it and run an macro which will add a column to test one or it save another file as test1( both will work) and in that test1 it will add a column say range ("f1:f & bottom) and test which is file name is given a code 23 and in f column 23 must come ???? hope u understand this.... is this possible to do?????
thanks,
robin Reply to robin_suv |
|