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:

D (Original Price)G (Re Price)I (Old Core Price)T (Primary Low %)U (Primary High %)V (Secondary Low %)W (Secondary High %)X (Core)Y (Re + Core Price)Z (New Core)
$502.34$146.97$10.00$22.05$51.44$426.99$477.22$51.44$198.41$51.44
=G4*0.15=G4*0.35=D4*0.85=D4*0.95=G4+X4=X4

<tbody>
</tbody>

<tbody>
</tbody>

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

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,214,552
Messages
6,120,172
Members
448,948
Latest member
spamiki

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