specific round figure

abdulla88

New Member
Joined
Jan 23, 2021
Messages
14
Office Version
  1. 2019
Platform
  1. Windows
I have a question and I hope to get an answer from you.

I have grades for some students and I want to make a round figure for the marks in a special way as follows:

  • If the figure in B1 contains 0.1 the round figure should be same 0.1
  • If the figure in B1 contains 0.2 the round figure should be same 0.2
  • If the figure in B1 contains 0.3 the round figure should 0.5
  • If the figure in B1 contains 0.4 the round figure should 0.5
  • If the figure in B1 contains 0.5 the round figure should be same 0.5
  • If the figure in B1 contains 0.6 the round figure should 1
  • If the figure in B1 contains 0.7 the round figure should 1
  • If the figure in B1 contains 0.8 the round figure should 1
  • If the figure in B1 contains 0.9 the round figure should 1
I hope that I have explained the question clearly, awaiting your answers, For more details please check attached file.



Thank You

Round figures.xlsx
ABC
1studentMarkCorrect fourm
2A50.150.1
3B50.250.2
4C50.350.5
5D50.450.5
6E50.550.5
7F50.651
8G50.751
9H50.851
10I50.951
Sheet1
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Based on your examples,

*** formula edited to allow for floating point precision error noticed after original was sumbitted ***
Book1
ABCD
1studentMarkFormulaCorrect fourm
2A50.150.150.1
3B50.250.250.2
4C50.350.550.5
5D50.450.550.5
6E50.550.550.5
7F50.65151
8G50.75151
9H50.85151
10I50.95151
Sheet1
Cell Formulas
RangeFormula
C2:C10C2=IF(ROUND(MOD(B2,1),1)>0.2,CEILING(B2,0.5),B2)
 
Upvote 0
try this
=IF(INT(RIGHT(b2;1))<3;b2;IF(INT(RIGHT(b2;1))<6;LEFT(b2;LEN(b2)-1)&"5";LEFT(b2;LEN(b2)-2)+1))
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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