Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how do i include an excel formula in a vb string?
Hi,
Am trying to build a Macro which will deposit an excel formala into an excel field if certain criteria are met. However - when i include a string along the lines of "=SUM(A1:A4)" the vb scipt will kick it out when it hits the first parenthesis as if it isn't accepting the character type within the string. Any suggestions of how i get round this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how do i include an excel formula in a vb string?
In VBA,
If you want to insert a worksheet function into a cell do this. Worksheets("Sheet1").Range("B1").Formula = "=SUM(A1:A4)" "Washballs" wrote in message ... Hi, Am trying to build a Macro which will deposit an excel formala into an excel field if certain criteria are met. However - when i include a string along the lines of "=SUM(A1:A4)" the vb scipt will kick it out when it hits the first parenthesis as if it isn't accepting the character type within the string. Any suggestions of how i get round this? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
how do i include an excel formula in a vb string?
Hi,
This should do it Range("B1").Formula = "=SUM(A1:A4)" -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Washballs" wrote: Hi, Am trying to build a Macro which will deposit an excel formala into an excel field if certain criteria are met. However - when i include a string along the lines of "=SUM(A1:A4)" the vb scipt will kick it out when it hits the first parenthesis as if it isn't accepting the character type within the string. Any suggestions of how i get round this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to read a string in excel and include the single quote | Excel Discussion (Misc queries) | |||
replace all the cells in sheet that include spsific string-via mac | Excel Programming | |||
How do you include a quotation as part of a string ?? | Excel Programming | |||
How can I include a " in my string? | Excel Programming | |||
How to include a double quotation character in a string? | Excel Programming |