Solved

Calculate new number based on multiples of ?

Posted on 2014-03-07
233 Views
Hi Experts

Need some help with my latest challenge.  If in cell A2 I have a number of 50.  In B2 I have a multiple of 30.  Keeping a whole number, how many additional widgets do I need to make a the closest multiple of 30 (rounding up).  So the answer would be 60 or 2 multiples of 30 where I have to add 10 to the original number.

If I have a number in A3 of 15 and 30 is the multiple than the answer would be 30.

I've attached a simple spreadsheet to help explain in an easier way what I need.

any help would be greatly appreciated as always.

Spudmcc (andy)
example.xlsx
0
Question by:spudmcc

LVL 23

Accepted Solution

NBVC earned 500 total points
Try, in C2:

=CEILING(A2,B2)

copied down

and in D2:

=C2-A2

copied down
0

LVL 35

Expert Comment

Hi Andy,

You can use ROUNDUP after dividing the number by the multiple, then multiply that result by the multiple amount itself:

=ROUNDUP(A2/B2,0)*B2

Fill down as needed.

Matt

EDIT: Nice use of CEILING, NBVC, I often forget about that function.
0

Author Closing Comment

This was spot on!  I so appreciate your knowledge and help in resolving this challenge for me.

Much thanks!

Andy
0

Featured Post

Suggested Solutions

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…