Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 144
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I use Dynamic Ranges to automate complex calculations? Exceluser Excel Discussion (Misc queries) 5 December 21st 07 09:25 PM
Automate without add-ins Rob Oldfield Excel Discussion (Misc queries) 3 October 21st 05 07:33 PM
automate hyperlink GEORGIA Excel Discussion (Misc queries) 8 August 15th 05 10:18 PM
Automate Add-in Gary's Student Excel Discussion (Misc queries) 4 June 20th 05 02:12 AM
Automate Add-In Geerty Excel Programming 2 June 6th 04 11:27 PM


All times are GMT +1. The time now is 08:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"