Tricky goal seek similar question

anro

New Member
Joined
Sep 10, 2007
Messages
9
Hi,

I have a fixed value in cell A1, say 15000

I then have a value is cell A2, which is the sum of a number of factors, including one of the numbers in a range A9:A17 (values from 40-48). What I want is to find a formula that pics the correct number in the range to equal A2 as close as possible to the value in cell A1. The formula could be written in, say cell A20.

Basically, I guess this formula must look somhow at A1, and understand what the "target" is, then at A2 and understand which number from the range A9:A17 it must pick for A2 to become as close as possible of the target (slightly below, not above).

Not sure if this is possible though, but would really appreciate some help on this! Looking forward to inputs!

Thanks a lot! Appreciate the effort of everyone helping out on this board.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
If the numbers in A9:A17 are 40, 41, ..., 48, then isn't the answer just

=MAX(40, MIN(A1-B1, 48))
 
Upvote 0
Hi SHG, Thank you for your reply.

MAX(40, MIN(A1-B1, 48)) . I assume you mean MAX(40, MIN(A1-A2, 48))? This will produce a circular. Also, I need the formula to look at the range (in the example values from 40-48, but could be 2, 2.3, 7) because these are spesific numbers which other cells are look at.

Does this makes sense? Hope you can help.
 
Upvote 0
Sorry, I don't understand your data layout. Perhaps you could post it using Excel Jeanie or similar.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,718
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top