View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default Finding Values of X

In Cell C1 put this formula:
= A1* (28-A1)

Load Solver by doing Tools, Add-ins and tick the Solver add-in.

Then Tools, Solver and

Set Target Cell C1
Equal to value of -16
By changing value of A1
Press Solve

To put it all in VBA do the same as above while recording a macro and study
the recorded code.


RBS


"Jeffrey" wrote in message
...
Good day,

im just a newbie in VBA, i wonder if we can find X using VBA codes to
satisfy the equation below.

X^2 -28X+16 = 0.

Basically i want to find the value of X so that the left side of the
equation is equal to zero.

Thanks in advance.