Complex problem - how many widgets should I sell?

GeekInPA

New Member
Joined
May 18, 2023
Messages
4
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
Looking for some advice and formulas!

  1. I've purchased many different colors of widgets.
  2. For each color, I purchased it at one or multiple costs and it has either increased or decreased in value.
  3. I'd like to sell different colors and quantities of my widgets and net out a $1000 total.
  4. Ideally, I'd have a cell where I could replace $1000 with whatever value I'm trying to solve for.
  5. I have the color name of the widget in column C. Red widget, Maroon widget, Scarlet widget, etc.
  6. Starting at the red widget, I have the quantity of my red widgets in F2-6, followed by the quantity of Maroon widgets in F7, and so on
  7. I have the cost I purchased that lot of red widgets for in G2, followed by the cost I purchased the second lot of red widgets in G3 each Maroon widget in G7, and so on
  8. I have the total cost for that lot of Red widgets in H2, followed by the cost I purchased each Maroon widget for in H7
  9. I have today's total market value of my red widgets in I2, and today's total market value of my maroon widgets in I7, and so on.
  10. I have the total dollar value that my red widget lots have increased or decreased (negative number) in value in L2, and the total dollar value that my maroon lot widgets have increased or decreased in value in L7
Question: How can I determine which widgets I should sell and how many of those widgets I should sell so that I get $1000 and their sum increase/decrease is 0.
I have to sell them in integers and if it needs to be either or positive or negative and almost $1000, round to the negative.

RowC:DescriptionF:QuantityG: Cost per widgetH: Total costI: Current Total Market valueL: Total Current gain loss
2Red121165.4220015.8221013.47997.65
3Red0.195142.7227.8333.866.03
4Red0.164169.9427.8728.480.61
5Red0.197141.6827.9134.216.3
6Red0.182153.6327.9631.613.65
7Maroon450.02200.08222.2822.2
8Scarlet40153.276130.844733.2-1397.64
9Brick Red1386.54386.54336.15-50.39
10English Vermilion6178.421070.521269.78199.26
11Madder Lake2011.89237.7179.8-57.9
12Permanent Geranium Lake3318.18954.541408.59454.05
13Maximum Red163.4563.4562.16-1.29
14Maximum Red0.00363.330.190.190
15Maximum Red0.00457.50.230.250.02
16Chestnut109.5895.884.9-10.9
17Orange-Red100128.1212812.112250-562.1
18Sunset Orange133.7133.7137.133.42
19Bittersweet118.9218.9218.74-0.18
20Bittersweet0.002200.040.040
21Dark Venetian Red1171.31171.31158.38-12.93
22Dark Venetian Red0.007161.431.131.11-0.02
23Dark Venetian Red2174.02348.03316.76-31.27
24Dark Venetian Red0.019178.953.43.01-0.39
25Dark Venetian Red0.022155.453.423.480.06
26Venetian Red570.5352.5344.75-7.75
27Venetian Red0.0473.752.952.76-0.19
28Venetian Red0.04664.572.973.170.2
29Light Vanetian Red537.57187.84192.254.41
30Light Vanetian Red0.04940.8221.88-0.12
31Light Vanetian Red0.05238.852.022-0.02
32Vivid Tangerine154.6554.6562.898.24
33Middle Red0.00762.860.440.440
34Burnt Orange0.00765.710.460.44-0.02
35Red-Orange108.4784.6580.6-4.05
36Orange10204.422044.22073.229
37Orange0.121190.9123.125.091.99
38Orange0.055193.2710.6311.40.77
39Orange0.05213.610.6810.37-0.31
40Orange0.052206.5410.7410.780.04
41Macaroni and Cheese1011.03110.384.27-26.03
42Middle Yellow Red4250.421001.681172.76171.08
43Middle Yellow Red0.0232405.526.741.22
44Middle Yellow Red0.022252.275.556.450.9
45Middle Yellow Red0.022279.556.156.450.3
46Middle Yellow Red0.023268.76.186.740.56
47Banana Mania5200.421002.11216.18214.08
48Maize119.0999.99104.064.07
49Orange-Yellow5221.421107.11823.89716.79
50Goldenrod305.3159120.3-38.7
51Goldenrod0.0794.940.390.32-0.07
52Goldenrod0.0735.210.380.29-0.09
53Goldenrod0.084.50.360.32-0.04
54Goldenrod0.0884.660.410.35-0.06
55Goldenrod0.1544.090.630.62-0.01
56Dandelion1717160.44-10.56
57Dandelion0.00383.330.250.18-0.07
58Dandelion0.00462.50.250.24-0.01
59Dandelion0.00462.50.250.24-0.01
60Dandelion1262.27747.18725.28-21.9
61Dandelion0.0564.63.233.02-0.21
62Dandelion0.0564.83.243.02-0.22
63Dandelion0.04966.533.262.96-0.3
64Dandelion0.0565.43.273.02-0.25
65Dandelion0.05363.43.363.2-0.16
66Dandelion0.05561.453.383.32-0.06
67Dandelion0.05561.823.43.32-0.08
68Yellow532.85164.25123.5-40.75
69Green-Yellow227.6955.3754.5-0.87
70Green-Yellow0.015300.450.41-0.04
71Green-Yellow0.01728.240.480.46-0.02
72Middle Yellow1092.42924.2614.15-310.05
73Olive Green2121.56243.12211.62-31.5
74Olive Green0.0121251.51.27-0.23
75Olive Green0.012125.831.511.27-0.24
76Spring Green502.22110.7953-57.79
77Maximum Yellow184.1684.16106.222.04
78Maximum Yellow0.00681.670.490.640.15
79Maximum Yellow585.99429.93530.98101.05
80Maximum Yellow385.97257.91318.5960.68
81Maximum Yellow0.04899.384.775.10.33
82Maximum Yellow0.047102.134.84.990.19
83Canary146.5146.5149.172.66
84Canary0.005420.210.250.04
85Canary0.004450.180.20.02
86Lemon Yellow5248.421242.1789.57-452.53
87Lemon Yellow0.031504.54.740.24
88Lemon Yellow0.031175.165.434.9-0.53
89Lemon Yellow6167.751006.47947.48-58.99
90Lemon Yellow0.079151.2711.9512.480.53
91Lemon Yellow0.075160.412.0311.84-0.19
92Maximum Green Yellow6129.31775.86838.1162.25
93Maximum Green Yellow63328.4720693.8211032.88-9660.95
94Maximum Green Yellow3286.38859.13525.38-333.76
95Middle Green Yellow428.51114.04156.2442.2
96Inchworm246.8493.68106.0312.35
97Inchworm0.01945.260.861.010.15
98Inchworm0.01749.410.840.90.06
99Inchworm0.01851.110.920.950.03
100Light Chrome Green216.6333.2627.87-5.39
101Light Chrome Green0.06112.790.780.850.07
102Light Chrome Green0.03912.820.50.540.04
103Light Chrome Green0.04715.530.730.65-0.08
104Light Chrome Green0.00616.670.10.08-0.02
105Yellow-Green176.1176.1176.510.4
106Yellow-Green0.00472.50.290.310.02
107Yellow-Green0.004750.30.310.01
108Yellow-Green0.00477.50.310.310
109Yellow-Green0.00472.50.290.310.02
110Yellow-Green0.00477.50.310.310
111Yellow-Green0.00477.50.310.310
112Maximum Green1509.29934.9452734.9538306.01-14428.9
113Asparagus71.52244.143156.983019.66-137.32
114Granny Smith Apple1183.67183.67196.4412.77
115Granny Smith Apple0.006201.671.211.18-0.03
116Granny Smith Apple0.007165.711.161.380.22
117Granny Smith Apple0.008182.51.461.570.11
118Granny Smith Apple0.0042150.860.79-0.07
119Fern71112.427981.827659.48-322.34
120Fern0.366113.0941.3939.48-1.91
121Middle Green10108.421084.2939.6-144.6
122Middle Green0.05591.645.045.170.13
123Middle Green0.065885.726.110.39
124Middle Green0.06999.136.846.48-0.36
125Middle Green0.07194.796.736.67-0.06
126Green93.85628.922714.742425.24-289.5
127Medium Chrome Green167.807335537.865233.9-303.96
128Forest Green71.045124.388836.679412.75576.08
129Sea Green1393.42393.42382.96-10.46
130Sea Green0.004357.51.431.530.1
131Sea Green1366.76366.76382.9616.2
132Sea Green0.009326.672.943.450.51
133Sea Green0.013373.373.830.46
134Sea Green0.008376.253.013.060.05
135Shamrock1276.77276.77236.7-40.07
136Shamrock50262.421312111835-1286
137Shamrock0.1227.222.7223.670.95
138Shamrock0.122210.8225.7228.883.16
139Shamrock0.142210.9229.9533.613.66
140Shamrock0.156225.0635.1136.931.82
141Mountain Meadow65.13294.726169.246536366.76
142Jungle Green1224.61224.61259.5634.95
143Jungle Green0.0022250.450.520.07
144Jungle Green0.2334214.225060.5810.58
145Jungle Green0.0022650.530.52-0.01
146Caribbean Green7158.421108.941067.92-41.02
147Caribbean Green0.031126.453.924.730.81
148Caribbean Green0.03131.333.944.580.64
149Caribbean Green0.028141.073.954.270.32
150Caribbean Green0.027149.634.044.120.08
151Tropical Rain Forrest21392.0919614.32223652750.68
152Tropical Rain Forrest1.94596.37187.44204.2316.79
153Tropical Rain Forrest1.87104.6195.6196.350.75
154Tropical Rain Forrest1.804109.37197.3189.42-7.88
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
This has all the hallmarks of a school assignment.
 
Upvote 0
This has all the hallmarks of a school assignment.
Nope. No school would be creative enough to have the problems I have in real life! lol The names in my problem were changed to protect the innocent! 😂
 
Upvote 0
"the innocent"... LOL....
I wouldn't be surprised if the schools trawl forums like these, and plagiarise questions like yours for materials... because, ya know, why not? :)
So don't be surprised if you learn your query is being used to torture business school students for years to come!
 
Upvote 0
"the innocent"... LOL....
I wouldn't be surprised if the schools trawl forums like these, and plagiarise questions like yours for materials... because, ya know, why not? :)
So don't be surprised if you learn your query is being used to torture business school students for years to come!
Got any suggestions to help solve it?
 
Upvote 0
Hmm - well I was thinking about it, but am somewhat held back by the lack of a Windows laptop with Excel on it (it's in 'hospital' getting fixed).
My default solution for all things (rightly or wrongly) is to use the programming language in Excel called VBA - but I'm sensing you're after a formula based solution?
 
Upvote 0
I am open to learning how to use VBA if there is a solution. What are you thinking?
 
Upvote 0
Well, it's Friday, so frankly, "thinking" is a bit of struggle at the moment - just trying to wrap my head around the task.
I'll ponder it some more, but I'm wondering actually if this is a good candidate for the What-If analysis function in Excel...
So presumably the goal is to sell all the widgets in different groupings of configurations. Can you set out a sample of what kind of output you would hope for (e.g., which color? how many of that colour? etc)
 
Upvote 0
You might want to look at Solver.
If Solver is not showing on your data ribbon then the link below will show how to add it plus give some examples.

These links give other solver examples show how to maximize profits that may help you figure out the number of widgets to sell.

 
Upvote 0
You might want to look at Solver.
If Solver is not showing on your data ribbon then the link below will show how to add it plus give some examples.

These links give other solver examples show how to maximize profits that may help you figure out the number of widgets to sell.

Thank you! That's what I was thinking of when I said What If analysis!
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,241
Members
452,622
Latest member
Laura_PinksBTHFT

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