Linking two values, then to be able to change one to see how the other is affected

mpeters87

New Member
Joined
Sep 19, 2019
Messages
1
Hi there,

I’ve been struggling to figure this out, and I’d appreciate any help.

I have a very basic table. One column is the name of products, the second column how many were sold, and the third column how much money was made off those sales. I’d like to set up away to link the two values. I’d then like to be able to change the value in the number sold to see how it would affect the money made, and to be able to set a money made target, to be able to see how many would need to be sold to make that much money.


Writing out it seems so simple but I’m just not familiar with how to do this. I’ve attached an example worksheet. Let's assume the columns are A, B and C.

Thank you in advance.


Note: the actual sheet I’d be using uses vlookups to populate the cells, but I have left them as values for the sake of this.



[TABLE="width: 223"]
<colgroup><col width="169" style="width: 127pt; mso-width-source: userset; mso-width-alt: 6180;"><colgroup><col width="64" style="width: 48pt;" span="2"><tbody>[TR]
[TD="width: 169, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"]Quantity[/TD]
[TD="width: 64, bgcolor: transparent"]Profit[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Sesame Seeds[/TD]
[TD="bgcolor: transparent"]4,500[/TD]
[TD="bgcolor: transparent"]31[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Quinoa[/TD]
[TD="bgcolor: transparent"]4,800[/TD]
[TD="bgcolor: transparent"]960[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Bulgur & Quinoa[/TD]
[TD="bgcolor: transparent"]594[/TD]
[TD="bgcolor: transparent"]650[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Monkey Nuts[/TD]
[TD="bgcolor: transparent"]2,520[/TD]
[TD="bgcolor: transparent"]1,246[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Peanuts R&S[/TD]
[TD="bgcolor: transparent"]3,024[/TD]
[TD="bgcolor: transparent"]978[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Macedonian[/TD]
[TD="bgcolor: transparent"]11,880[/TD]
[TD="bgcolor: transparent"]2,793[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Onassis Giant Beans[/TD]
[TD="bgcolor: transparent"]2,288[/TD]
[TD="bgcolor: transparent"]627[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
A cell can either be a value or a formula (unless you use VBA) so I'd leave your three columns unchanged and add three more for overrides and results:

ABCDEF
QuantityProfitMessage
Sesame SeedsSales of 50000 gives profit of 344
QuinoaProfit of 2500 needs sales of 12500
Bulgur & Quinoa
Monkey Nuts
Peanuts R&SSales of 25000 gives profit of 8085
Macedonian
Onassis Giant BeansProfit of 1000 needs sales of 3649

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"][/TD]

[TD="align: center"]Override Quantity[/TD]
[TD="align: center"]Override Profit[/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]4,500[/TD]
[TD="align: right"]31[/TD]
[TD="align: center"]50,000[/TD]
[TD="align: center"][/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]4,800[/TD]
[TD="align: right"]960[/TD]
[TD="align: center"][/TD]
[TD="align: center"]2,500[/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]594[/TD]
[TD="align: right"]650[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]

[TD="align: center"]5[/TD]

[TD="align: right"]2,520[/TD]
[TD="align: right"]1,246[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]

[TD="align: center"]6[/TD]

[TD="align: right"]3,024[/TD]
[TD="align: right"]978[/TD]
[TD="align: center"]25,000[/TD]
[TD="align: center"][/TD]

[TD="align: center"]7[/TD]

[TD="align: right"]11,880[/TD]
[TD="align: right"]2,793[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]

[TD="align: center"]8[/TD]

[TD="align: right"]2,288[/TD]
[TD="align: right"]627[/TD]
[TD="align: center"][/TD]
[TD="align: center"]1,000[/TD]

</tbody>
mpeters87

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F2 and down
[/TH]
[TD="align: left"]=IF(E2&D2="","",IF(D2="","Profit of "&E2&" needs sales of "&INT((B2/C2)*E2),"Sales of "&D2&" gives profit of "&INT(D2/(B2/C2))))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

I could add a check that you don't enter both overrides and I could use TEXT to format the number results but I'll keep it simple.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
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