Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a bunch of cells with strings like this: (RUP((x+7)*2 +45)*2).
The actual formulas don't matter too much, other than that they aren't all the same - there are a number of different variables and parentheses sets. I'd like to make a function that will allow me to use these strings mostly as-is. I'm trying to define RUP(string) = WorksheetFunction.RoundUp(string, 0) without having to go through and try to replace any text in the original strings. I'm not sure how to go about this other than including a lengthy formulation for "string" in the function. Is there an easier way to do this? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Look at the VBA help for the function EVALUTE().
"festdaddy" wrote: I have a bunch of cells with strings like this: (RUP((x+7)*2 +45)*2). The actual formulas don't matter too much, other than that they aren't all the same - there are a number of different variables and parentheses sets. I'd like to make a function that will allow me to use these strings mostly as-is. I'm trying to define RUP(string) = WorksheetFunction.RoundUp(string, 0) without having to go through and try to replace any text in the original strings. I'm not sure how to go about this other than including a lengthy formulation for "string" in the function. Is there an easier way to do this? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Joel, but I can't see how to EVALUATE work for me. Essentially
I'm trying to write a function that will work like worksheet.function.roundup, but that will always use 0 as the number of decimals. I can't seem to figure out how to get the syntax for the arguments of roundup. The only alternative I can think of is to do some complicated replacements to put ",0)" in place of certain ")"... If EVALUATE really can be used to accomplish this, could you show me an example? Thanks, Rob |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I make my functions public to all workbooks? | Excel Discussion (Misc queries) | |||
Public Functions | Excel Programming | |||
Refering to Public Variables in Functions | Excel Programming | |||
Where to Place Public Subs and Functions | Excel Programming | |||
Public Functions As Worksheet Available Functions | Excel Programming |