Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
changing a formula range in visual basic
I need some help, I've been searching for some time and I guess the answer
is simple, but for me it's puzzel. I have a macro wich have to change a number of formules. I want the macro to change the range in the formule. For example: formuleinacell = "=sum(a1:a5")" newrange=10 ** some kind of code....** newformuleinthecell = "=sum(a1:a10")" what is the best way to program? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
changing a formula range in visual basic
x=10
Range("b5").Formula = "=sum(a1:a" & x & ")" 'or below to leave just the value 'range("b5")=application.sum(range("a1:a" & x)) -- Don Guillett SalesAid Software "OoM JaN" wrote in message news:dD6rc.1823$Bb6.40261@zonnet-reader-1... I need some help, I've been searching for some time and I guess the answer is simple, but for me it's puzzel. I have a macro wich have to change a number of formules. I want the macro to change the range in the formule. For example: formuleinacell = "=sum(a1:a5")" newrange=10 ** some kind of code....** newformuleinthecell = "=sum(a1:a10")" what is the best way to program? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
changing the visual basic in office 2003 to visual studio net | Excel Discussion (Misc queries) | |||
Changing the color of a Series Collection using visual basic? | Charts and Charting in Excel | |||
Changing Formula References in Visual Basic | Excel Programming | |||
Range Reference in Visual Basic | Excel Programming | |||
Visual Basic Range variable | Excel Programming |