Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automate calculations
How can automate a calculation in the following scenario:
Eg. Column 1 = A Column 2 = Maths operation eg. + / - / X / ./. Column 3 = B To automate calculation in column 4 = A + or - or X or ./. B depending on what is keyed into column 2 Thank you in advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automate calculations
Hi
try the following UDF: Public Function my_calculate(op1 As Range, operand As Range, op2 As Range) my_calculate = Application.Evaluate("=" & op1.Value & operand.Value & op2.Value) End Function And now use in your spreadsheet in D1: =my_calculate(A1,B1,C1) -- Regards Frank Kabel Frankfurt, Germany "Cheryl" schrieb im Newsbeitrag ... How can automate a calculation in the following scenario: Eg. Column 1 = A Column 2 = Maths operation eg. + / - / X / ./. Column 3 = B To automate calculation in column 4 = A + or - or X or ./. B depending on what is keyed into column 2 Thank you in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I use Dynamic Ranges to automate complex calculations? | Excel Discussion (Misc queries) | |||
Automate without add-ins | Excel Discussion (Misc queries) | |||
automate hyperlink | Excel Discussion (Misc queries) | |||
Automate Add-in | Excel Discussion (Misc queries) | |||
Automate Add-In | Excel Programming |