Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
A new at the macro programming and am trying to produce a macro that fillsdown formula on my spreadsheet but keeps the formatting. This is the code that I have currently but it does not keep the format of the cells. ActiveSheet.Range("V7").Select ActiveCell.FormulaR1C1 = "=SUM(RC[-20]:RC[-2])" ActiveSheet.Range("V7:V10").Select Selection.FillDown ActiveSheet.Range("V31").Select ActiveCell.FormulaR1C1 = "=SUM(RC[-20]:RC[-2])" ActiveSheet.Range("V31:V39").Select Selection.FillDown Any help would be greatly appreciated. Thanks, Ben |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range("V7:V10,V31:V39").FormulaR1C1 = "=SUM(RC[-20]:RC[-2])"
alone should do what you want. -- Regards, Tom Ogilvy "Ben Noall" wrote: Hi, A new at the macro programming and am trying to produce a macro that fillsdown formula on my spreadsheet but keeps the formatting. This is the code that I have currently but it does not keep the format of the cells. ActiveSheet.Range("V7").Select ActiveCell.FormulaR1C1 = "=SUM(RC[-20]:RC[-2])" ActiveSheet.Range("V7:V10").Select Selection.FillDown ActiveSheet.Range("V31").Select ActiveCell.FormulaR1C1 = "=SUM(RC[-20]:RC[-2])" ActiveSheet.Range("V31:V39").Select Selection.FillDown Any help would be greatly appreciated. Thanks, Ben |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro filldown | Excel Worksheet Functions | |||
FillDown Macro | Excel Worksheet Functions | |||
filldown macro | Excel Programming | |||
Macro Filldown | Excel Worksheet Functions | |||
FillDown | Excel Programming |