Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can MS Excel SOLVER use the LOOKUP function?

Status
Not open for further replies.

mbasimon

Programmer
Mar 31, 2004
31
CA
Hi, I'm having trouble getting SOLVER to work with a LOOKUP function.

My Target cell is L3, which contains
"=LOOKUP(K3,A6:A12,L6:L12)"

My Changing cell is K3

There are no contraints

Cells A6-A12 contain the digits 1 through 7
Cells L6-L12 contain some calculated values, but it fails even if L6-L12 contains inputted values.

If I change my L3 cell to some formula with simple math, Solver works fine. But I can't get it to work with my Lookup formula. Am I doing something wrong, or does it just not work with lookups?

Thanks !!
 


All that LOOKUP does is return a value.

A VALUE is a VALUE! Does not matter HOW the value got there!

Please explain HOW you are using solver.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Hopefully this answers your question:

I'm trying to maximize the value of L3 by changing the value in K3. L3 takes K3, looks that up in A6-A12 and retrieves the value from L6-L12. Columns B-K (rows 6-12)contains various values (non-linear), Cell L6 contains K6*E6, cells L7-12 is the same thing as L6 with different row numbers of course.

When I click on "Solve", it only just keeps whatever value was there in the first place.

However if I change L3 to something like "=K3*2", it works just fine and finds the right value.

It's possible that the problem isn't with my understanding of SOLVER, but rather with my understanding of LOOKUP. For example, the values of A6-A12 are simply 1-7. It's just a unique key value. But I think LOOKUP isn't just an integer function, and perhaps that is causing my problems?
 


OK you think that you have a problem with LOOKUP?

Does the value in L3 CHANGE to the value you expect, when you enter a different value in K3?

If the answer is "Yes," then your problem is NOT with LOOKUP.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Yes, the value in L3 changes when I enter a different value in K3.
 



So how is the value from L3, assigned to whatever textbox in solver?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Not sure I understand the question, but $L$3 is the "Set Target Cell" and $K$3 is the "By Changing Cells". Is that what you were looking for?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top