Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Using Solver within Macro

Dear Excel Programers,
I would like to know if it is possible to use solver from within a macro,
but not with value kept in cells but with values kept in variables.
for examples, supose I have two variables:
X = 3 and Y = 2. and I want to solve the linear equation:
Y = a*X + b
I would like to pass the function a*X+b-Y to the Solver and solve for a and
b, without having to write the data to cells in a worksheet and read the
results from this worksheet.

Thanks for the help

Sincerely yours,

Avner Mediouni
R&D Physicist
email:


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Using Solver within Macro

I may be wrong, but it looks like you have 1 equation with 2 unknowns.
There would be many solutions. For a particular solution, I believe you
need another equation or some type of constraint.
I believe the Solver tool only works with data from a spreadsheet. I don't
believe you can pass it an array of values. One of the first few steps of
Solver is to copy your "changing cells" on a worksheet so that you can later
click to restore the original values. The "Changing Cells" is a Range on
the worksheet.
With two equations in two unknowns, you should be able to Solve for a & b
directly.

--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =


"Avner Mediouni" wrote in message
...
Dear Excel Programers,
I would like to know if it is possible to use solver from within a macro,
but not with value kept in cells but with values kept in variables.
for examples, supose I have two variables:
X = 3 and Y = 2. and I want to solve the linear equation:
Y = a*X + b
I would like to pass the function a*X+b-Y to the Solver and solve for a

and
b, without having to write the data to cells in a worksheet and read the
results from this worksheet.

Thanks for the help

Sincerely yours,

Avner Mediouni
R&D Physicist
email:




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
XL solver macro brdotter Excel Worksheet Functions 0 March 19th 09 12:12 PM
Is it possible to run Solver using a macro? EA405 Excel Worksheet Functions 1 May 2nd 06 08:05 PM
help with solver or macro Dan[_24_] Excel Programming 1 September 23rd 03 04:31 PM
Solver Macro Dick Stumbo Excel Programming 0 September 18th 03 01:55 AM


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