Formula issue. Rounding number up.

noveske

Board Regular
Joined
Apr 15, 2022
Messages
120
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
I put a number into F5. The number in F5 is rounded up to the nearest whole number.

Example:
1.1 = 2
9.99 = 10
11.46 = 12

Here is the formula:
Excel Formula:
=CEILING(LEFT(F5,SUM(LEN(F5)-LEN(SUBSTITUTE(F5,{"0","1","2","3","4","5","6","7","8","9"},"")))),1)

The formula works if the decimal goes out to the hundreths. .xx
But when it's just a single decimal in the tenths, it doesn't round up.

The value that's entered into F5 is: mm (m)

Copied and pasted value. So the formula needs to remove "(m)".

Any solutions here? Been stuck on this one a while.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Could you please provide some sample data? If you could use the XL2BB tool, it would be helpful.

Thanks,

Doug
 
Upvote 0
Try:

varios 26sep2023.xlsm
AFG
1
51.1 (m)2
Hoja5
Cell Formulas
RangeFormula
G5G5=CEILING(LEFT(F5,SEARCH("(",F5)-2),1)


Or:
varios 26sep2023.xlsm
AFG
1
51.123 (m)2
Hoja5
Cell Formulas
RangeFormula
G5G5=CEILING.MATH(LEFT(F5,SEARCH("(",F5)-2),1)
 
Upvote 0
Solution
I read it again after reading @DanteAmor response and it make more sense.:oops: Another possible option using ROUNDUP....

in cell G5:
Excel Formula:
=ROUNDUP(LEFT(F5,SEARCH("(",F5)-2),0)
 
Upvote 0
Another option
Excel Formula:
=CEILING(TEXTBEFORE(F5,"("),1)
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,952
Members
449,095
Latest member
nmaske

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