Running Solver on Multiple Rows of Data

Boilermaker24

New Member
Joined
Apr 15, 2018
Messages
1
Hi Everyone,

I am working on a problem to update pricing throughout a database of about 800 parts. After looking around online, I think Solver is the best way to approach this problem, but I couldn't find any VBA code to execute this.

Here are the rules (also illustrated below)
Primary Logic: 15% <= Core <= 35% Re Price
Secondary Logic: 85% <= Re Price + Core Price <= 95% Original Price

I pulled the data from row 4 of the spreadsheet and included the formulas:

[TABLE="width: 762"]
<tbody>[TR]
[TD="align: right"][TABLE="width: 500"]
<tbody>[TR]
[TD]D (Original Price)[/TD]
[TD]G (Re Price)[/TD]
[TD]I (Old Core Price)[/TD]
[TD]T (Primary Low %)[/TD]
[TD]U (Primary High %)[/TD]
[TD]V (Secondary Low %)[/TD]
[TD]W (Secondary High %)[/TD]
[TD]X (Core)[/TD]
[TD]Y (Re + Core Price)[/TD]
[TD]Z (New Core)[/TD]
[/TR]
[TR]
[TD]$502.34[/TD]
[TD]$146.97[/TD]
[TD]$10.00[/TD]
[TD]$22.05[/TD]
[TD]$51.44[/TD]
[TD]$426.99[/TD]
[TD]$477.22[/TD]
[TD]$51.44[/TD]
[TD]$198.41[/TD]
[TD]$51.44[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]=G4*0.15[/TD]
[TD]=G4*0.35[/TD]
[TD]=D4*0.85[/TD]
[TD]=D4*0.95[/TD]
[TD][/TD]
[TD]=G4+X4[/TD]
[TD]=X4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]

X4 <= U4
X4 >= T4
Y4 <= W4
Y4 >= V4

Changing Variable Cells: X4
Set Objective (Max): Z4

I am looking to replicate this down about 800 rows of data to find the max core price for each part given the constraints. I am not looking to manually update solver each time and was thinking there was a better way to do this through VBA.

Thanks,
Isaac
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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