VBA Macro

  • Thread starter Thread starter redlion
  • Start date Start date
R

redlion

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
 
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
 
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top