Calculate new number based on multiples of ?

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
Who is Participating?

x

Commented:
Try, in C2:

=CEILING(A2,B2)

copied down

and in D2:

=C2-A2

copied down
0

Commented:
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 Commented:
This was spot on!  I so appreciate your knowledge and help in resolving this challenge for me.

Much thanks!

Andy
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.