How to round value by specific value after decimal and change all value to zero after round

trungtb

New Member
Joined
Aug 5, 2023
Messages
9
Office Version
  1. 2021
Platform
  1. MacOS
I use excel and i have question.
I have value look like

Code:
7,500,300

If value after first comma less than 5(it 5 on my case) now round value into 0.
If value after first comma greater than and equal 5 now value into 5

Example:


Code:
    7,500,300 => 7,500,000
    7,5200,200 => 7,500,000
    7,9400,200 => 7,500,000
    7,2400,300 => 7,000,000
I using command look like :

Code:
=IF((VALUE(MID(7,9400,200,FIND(",",7,9400,200)+1,1))>=5),ROUND(7,9400,200),ROUNDDOWN(7,9400,200)

But it not working.

Please help me. Thanks you
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I has write incorrect my example. Because i cannot edit post. Please look my edit

Code:
    7,500,300 => 7,500,000
    7,520,200 => 7,500,000
    7,940,200 => 7,500,000
    7,240,300 => 7,000,000

If value after first comma greater than and equal 5 now value into 5 => If value after first comma greater than or equal 5 now value into 5
Thanks you so much
 
Upvote 0
Try this formula:
Excel Formula:
=FLOOR(A1,500000)

EDIT: Too slow! Fluff sneaked in before me! ;)
 
Upvote 0
Is that meant to be 7 1/2 million?
 
Upvote 0
A reminder:

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at:

There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
=INT(B2/1000000)*1000000 + IF(MOD(B2,1000000)>500000,500000,0)
 
Upvote 0
A reminder:

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at:

There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
Thanks you.
Is that meant to be 7 1/2 million?
Try this formula:
Excel Formula:
=FLOOR(A1,500000)

EDIT: Too slow! Fluff sneaked in before me! ;)
Thanks you for help . Problem has solve on cross posted.
 
Upvote 0

Forum statistics

Threads
1,215,331
Messages
6,124,311
Members
449,152
Latest member
PressEscape

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