Change value of cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a a value in a cell that solver worked out for me. It is an algebra
formula. Is there some way of seeing the actual formula? This formula
established the % that I need to take of Col A the cost price to get to Col B
the selling price at a pre determined GP of 27%. IE what I am trying to say
that the % required to go from cost to w/sale is 37.5% but I would like to
see the GP figure of 27% on the spreadsheet so what formula do I need to
enter.

I hope this all make sense and someone could help me.

Thanks Eqa
 
You can create a custom function. Use the one below

call with function below on worksheet
=getformula(A8)

Function getformula(cell As Range)
getformula = cell.Formula
End Function
 
Joel,

Where and how do I use/ enter this custom function?
Why have you used A8?

Thanks for your help

Eqa
 
A8 is the cell you want to see the formula. You could put =getformula(A8) in
cell A10

To add the code - go to worksheet and rtight click tab on bottom of sheet
(normally sheet1, but can be anythin). Then select View Code (last option).
Next from VBA window - Insert Module
Copy and paste code posted without the leading >.
-------------------------------------------------------------------------

Function getformula(cell As Range)
getformula = cell.Formula
End Function

---------------------------------------------------
 
Joel,

Thanks for that, but after I have done that all I get in A 10 is the numbers
that was inserted into A 8 by solver. So I still don't know what the formula
is, or am I doing something wrong? This is an algebra driven formula which I
am struggling to work out.

Thanks again
Eqa
 
Back
Top