Find factor by target and given range

mrwad

New Member
Joined
Oct 16, 2018
Messages
49
I have a range on values, starting from `A1`, let's say:

PB4hz.png


Then I have a target, let's say: `43543`

Currently I am inputting values into Excel sheet and writing to cell `B1` formula `=CEILING(A1*$C$14, 1)` then dragging it down. In cell `C14` I have a factor, let's say `1.54`, then I am starting to manually adjust this factor in order to achieve `43543` as a result. In my example case I tried about 30 times until I have found that it should be `6.0588`

My question is: is there some formula that can automatically calculate this factor?

I have tried several solutions I have found, but can't get this working.

W0oWG.png
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
This is the best I can come up with but, it doesn't end up using integers as the values to sum.
I'm not sure how to get around the ceiling issue.

mr excel questions 22.xlsm
ABCD
12341418
21273
3435626393
43442085
52341418
612147356
73241964
82341418
92341418
10
11Current Sum43543
12Target43543=C11/(SUM(A1:A9))
13Factor6.05886.059421097
Mr Wad
Cell Formulas
RangeFormula
B1:B9B1=CEILING(A1*$C$13,1)
C11C11=SUM(B1:B9)
D12D12=FORMULATEXT(D13)
D13D13=C11/(SUM(A1:A9))
 
Upvote 0
Thank you for your answers. However these does not work. By changing target value to some other value, factor is changed but Current sum and Target does not match. I think the only option is to iterate through values using VBA. I have also noticed that in some cases it is not even possible to get factor even with precision 0.0000000001 and values has to be adjusted manually to get that last 1.

For example:


234​
2865​
12​
147​
4356​
53330​
344​
4212​
234​
2865​
1214​
14863​
324​
3967​
234​
2865​
234​
2865​
Current Sum
87979​
Target
87978​
Factor
12.24297​
 
Upvote 0
Well, they will work if you dont use the ceiling function! :)
But, aside from that. What is the objective of this exercise? Maybe there is another way to acheive your end result.
 
Upvote 0

Forum statistics

Threads
1,215,143
Messages
6,123,285
Members
449,094
Latest member
GoToLeep

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