If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Rounding off
Guys,
I have a question. Suppose I have a column which has values ; 300 315 330 390 Now i want these values rounded off to the nearest quarter, eg, 300 remains 300. 315 becomes 325 330 becomes 325 and 390 becomes 400 I tried using mround but that rounds off everything to the NEXT quarter. Any way i can do this automatically?? Thanks, Ace |
#2
|
|||
|
|||
Rounding off
assuming the value is in a1
=round(a1/25, 0)*25 -- HTH... Jim Thomlinson "ace" wrote: Guys, I have a question. Suppose I have a column which has values ; 300 315 330 390 Now i want these values rounded off to the nearest quarter, eg, 300 remains 300. 315 becomes 325 330 becomes 325 and 390 becomes 400 I tried using mround but that rounds off everything to the NEXT quarter. Any way i can do this automatically?? Thanks, Ace |
#3
|
|||
|
|||
Rounding off
I think you are using MROUND incorrectly, as it should do what you are asking
for. =MROUND(310,25) evaluates to 300, whereas =MROUND(315,25) evaluates to 325 -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "ace" wrote: Guys, I have a question. Suppose I have a column which has values ; 300 315 330 390 Now i want these values rounded off to the nearest quarter, eg, 300 remains 300. 315 becomes 325 330 becomes 325 and 390 becomes 400 I tried using mround but that rounds off everything to the NEXT quarter. Any way i can do this automatically?? Thanks, Ace |
#4
|
|||
|
|||
Rounding off
Guys,
Got it, it works like a charm. Thanks, Much appreciated, Ace "Luke M" wrote: I think you are using MROUND incorrectly, as it should do what you are asking for. =MROUND(310,25) evaluates to 300, whereas =MROUND(315,25) evaluates to 325 -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "ace" wrote: Guys, I have a question. Suppose I have a column which has values ; 300 315 330 390 Now i want these values rounded off to the nearest quarter, eg, 300 remains 300. 315 becomes 325 330 becomes 325 and 390 becomes 400 I tried using mround but that rounds off everything to the NEXT quarter. Any way i can do this automatically?? Thanks, Ace |
Thread Tools | |
Display Modes | |
|
|