#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Macro


Hi There,

I have a number of formulars for example =SUM(B2/C2) in Cell D9 how do
i get a macro to calculate all of these for me and put the answer in D9
for me.

A list of some others
Current Ratio =SUM(B2/C2)
Total Asset Turnover =SUM(K2/L2)
Debt-to-Equity =SUM(C2+O2)/P2
Dividend Per Share =SUM(T2/S2)
Luqid Ratio =SUM(B2-I2)/(C2-F2)

Thanks Heaps






Thanks Heaps


--
redlion
------------------------------------------------------------------------
redlion's Profile: http://www.excelforum.com/member.php...o&userid=36140
View this thread: http://www.excelforum.com/showthread...hreadid=560934

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default VBA Macro

Not sure what you mean, but if you have a formula in a cell, it returns a
value.
So, your cell D9 will show the result of the formula.
Not sure how/why you want all these results in D9; makes no sense.

Also, in these formulae, you use SUM. As you only have single arguments, SUM
serves no purpose here.

NickHK

"redlion" wrote in
message ...

Hi There,

I have a number of formulars for example =SUM(B2/C2) in Cell D9 how do
i get a macro to calculate all of these for me and put the answer in D9
for me.

A list of some others
Current Ratio =SUM(B2/C2)
Total Asset Turnover =SUM(K2/L2)
Debt-to-Equity =SUM(C2+O2)/P2
Dividend Per Share =SUM(T2/S2)
Luqid Ratio =SUM(B2-I2)/(C2-F2)

Thanks Heaps






Thanks Heaps


--
redlion
------------------------------------------------------------------------
redlion's Profile:

http://www.excelforum.com/member.php...o&userid=36140
View this thread: http://www.excelforum.com/showthread...hreadid=560934



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Macro


Sorry NickHK,

All I need is a macro which uses this formula =SUM((D2+E2))/2*(365)/J
and put the answer in cell E9

Regard

--
redlio
-----------------------------------------------------------------------
redlion's Profile: http://www.excelforum.com/member.php...fo&userid=3614
View this thread: http://www.excelforum.com/showthread.php?threadid=56093

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default VBA Macro

Why not just put the formula in E9:
=SUM((D2,E2))/2*(365)/J2

Note, you do not need "SUM" and "+". One or the other.

NickHK

"redlion" wrote in
message ...

Sorry NickHK,

All I need is a macro which uses this formula =SUM((D2+E2))/2*(365)/J2
and put the answer in cell E9

Regards


--
redlion
------------------------------------------------------------------------
redlion's Profile:

http://www.excelforum.com/member.php...o&userid=36140
View this thread: http://www.excelforum.com/showthread...hreadid=560934



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Macro


Because I would like it Macro driven so other uses can not stuff up the
formulars, but I Got Thanks Mate

Sub Ratio()
Sheets("data").Select
Range("E21").Value = Evaluate("=SUM((D2+E2))/2*(365)/J2 ")
End Sub


--
redlion
------------------------------------------------------------------------
redlion's Profile: http://www.excelforum.com/member.php...o&userid=36140
View this thread: http://www.excelforum.com/showthread...hreadid=560934



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default VBA Macro

That's why you can Protect the worksheet.

NickHK

"redlion" wrote in
message ...

Because I would like it Macro driven so other uses can not stuff up the
formulars, but I Got Thanks Mate

Sub Ratio()
Sheets("data").Select
Range("E21").Value = Evaluate("=SUM((D2+E2))/2*(365)/J2 ")
End Sub


--
redlion
------------------------------------------------------------------------
redlion's Profile:

http://www.excelforum.com/member.php...o&userid=36140
View this thread: http://www.excelforum.com/showthread...hreadid=560934



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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Need syntax for RUNning a Word macro with an argument, called from an Excel macro Steve[_84_] Excel Programming 3 July 6th 06 07:42 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 06:39 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"