How to usage RoundUp-RoundDown in Excel

Faozan

Banned user
Joined
May 14, 2023
Messages
25
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
  6. 2011
  7. 2010
  8. 2007
  9. 2003 or older
Platform
  1. Windows
  2. MacOS
  3. Mobile
  4. Web
I have a number set input to excel by number is 165.78 to 166 or 164.32 to 164

Dim cRow

Sheet1.Cells(cRow, 7) = Trim(Mid(Textline,1,6))
If Len(Sheet60.Cells(cRow,7)) = 10 Then
--->
Else
--->
End If

Please help me to answer
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Your question is very confusing/unclear. I do not see what your VBA code has to do with your question title.
Perhaps it would be better for you to SHOW us what you want to do.
Please show us a sample of your data to begin with, and then show us what you want your expected results to look like.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Your question is very confusing/unclear. I do not see what your VBA code has to do with your question title.
Perhaps it would be better for you to SHOW us what you want to do.
Please show us a sample of your data to begin with, and then show us what you want your expected results to look like.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
How to excel by number is 165.78 to 166 and 164.32 to 164
 
Upvote 0
Use the ROUND function to round off the number to the nearest whole number.
The ROUND function exists in both Excel and in VBA, and works the same.
 
Upvote 0
Use the ROUND function to round off the number to the nearest whole number.
The ROUND function exists in both Excel and in VBA, and works the same.
Please show example to me
 
Upvote 0
Did you look at the link I sent?
It shows examples there.

Here is a link to the wroksheet function ROUND versus the VBA one in the previous link.

Take some time to look at it and read through the links.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,259
Members
452,626
Latest member
huntinghunter

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