Automatically Calculate Desired Number

tdm1103

New Member
Joined
Mar 31, 2011
Messages
19
I have an excel sheet in which 24 consecutive columns(row 2, columns A-X) have a numerical values in the same row based on other information in the sheet. The value can go up or down depending what numbers are below it (sales or purchases). For example the value in each cell is 100 units, but I want it to be 180 units. I need to sell 80 more units to get to the desired number of 180 units.

Is there code that a Macro Button can be pressed by the user so that depending on value of the cells in row 2 a sale or purchase number will be created so that total units equals 180?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
You can also use Excel Solver. (Solver is an Excel add-in supplied with Excel)

It can solve problems by enabling a Target cell to achieve some goal.
This goal may be to mininimse, maximise, or achieve some target value.

It solves the problem by adjusting a number of input cells according to a set of criteria or constraints which are defined by the user.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

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