nearest 5

ahmedismailfourtex

Board Regular
Joined
Apr 28, 2015
Messages
124
Hello,
I am trying to define some range of numbers by the nearest down 5 (i.e. 7 to 5 and 43 to 40) is there any easy way to do it by PQ or
PP ?
Thanks.:)
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
The standard approach I use is round(number/target,0)*target. So, in Excel use ROUND(x/5,0)*5. In PowerQuery, use Number.Round(x/5,0,roundingmode.awayfromzero) -- with the appropriate capitalization.
Hello,
I am trying to define some range of numbers by the nearest down 5 (i.e. 7 to 5 and 43 to 40) is there any easy way to do it by PQ or
PP ?
Thanks.:)
 
Upvote 0
The question is a bit confusing as you don't want to round to the nearest, but you want to round down to a multiple of 5.
That would be: 5*Number.RoundDown(x/5,0)
 
Upvote 0

Forum statistics

Threads
1,214,547
Messages
6,120,139
Members
448,948
Latest member
spamiki

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