Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is the code I have but am having problems with my loop for filling the
cells in the new range: Sub AutoFillColE() ' ' AutoFillColE Macro ' Auto fill col E based upon length of Current Region ' Dim rngCell As Range Dim rngCurrent As Range Dim shtFlagelNoB05 As Worksheet Set shtFlagelNoB05 = Application.ActiveWorkbook.Worksheets("Flagel_ERP_ NoB05") Set rngCurrent = shtFlagelNoB05.Range("A4").CurrentRegion Set rngCurrent = rngCurrent.Offset(rowoffset:=1, columnoffset:=4) Set rngCurrent = rngCurrent.Resize(RowSize:=rngCurrent, ColumnSize:=1) 'Paste formula in each cell in Column E from E5 down to bottom of new range For Each rngCell In rngCurrent rngcell.Formula = "=IF(B4 <= TODAY()-77,"11+ Weeks",IF(B4 <= TODAY()-42,"6 to 10 Weeks",IF(B4 <= TODAY()-7,"1 to 5 Weeks",IF(B4 TODAY()-7,"Current Week"))))" Next rngCell End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Resize Chart to fit picture fill Excel 2007 | Charts and Charting in Excel | |||
how do I resize a range of cells in a column in excel? | Excel Discussion (Misc queries) | |||
Resize Last Row to Fill a Page Width | Excel Discussion (Misc queries) | |||
Getting Range to move 1 column left and resize by 1 | Excel Programming | |||
How to fill range with formula using VBA? | Excel Programming |