Goal seek with two conditions

ravishankar

Well-known Member
Joined
Feb 23, 2006
Messages
3,566
I want to find the values of a,b,c,d and e if a*5+b*4+c*3+d*2+e*1 = 70 (or any other input value) and a+b+c+d+e = 20 (fixed).
any solutions preferably a worksheet function or else a macro is also OK
ravi
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Assuming:

values 5, 4, 3, 2, 1 are in range A2:E2;
70 is in F3; 20 is in G3;
your data are in range A3:E3.

Array enter this (paste and hit ctrl+shift+enter keys simultaneously) and copy across:

Code:
[TABLE="width: 64"]
<tbody>[TR]
  [TD="width: 64"]=IF(AND(SUM($A$3:$E$3*$A$2:$E$2)=$F$3,SUM($A$3:$E$3)=$G$3),A3,"")[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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