Excel VBA Round-off issue

xlhelp15

Board Regular
Joined
Sep 12, 2014
Messages
116
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
Hello Experts - I'm facing issue in round-off for the below condition,

Billed Amount : 84.65
Percentage : 150%

84.65 * 150% = 126.975 - I need 126.98 in final output.

Have tried it, Round(cells(counter,1).value, 2) ; 126.98 but when I press F2 in the respective cell it still shows 126.975.

pls. help me to fix it.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Re: Excel VBA Round-off issue - Help needed

Are the calculations being done on the worksheet or in VBA code?
What is actually in your cell, the formula, or a hard-coded value?
Can you post your full VBA code?
 
Upvote 0
Re: Excel VBA Round-off issue - Help needed

Thank you for your kind response.

If Cells(myCount, 18).Value <> "" Then
Cells(myCount, 21).Value = (Cells(myCount, 19).Value * Cells(myCount, 9).Value)
Cells(myCount, 21).Value = Round(Cells(myCount, 21).Value, 2)
Cells(myCount, 10).Value = Cells(myCount, 8).Value - Round((Cells(myCount, 21).Value), 3)
Cells(myCount, 10).Value = Round(Cells(myCount, 10).Value, 3)
Cells(myCount, 10).Value = Cells(myCount, 10).Value * 100
end if
 
Upvote 0
Re: Excel VBA Round-off issue - Help needed

How/when are you running this code?
 
Upvote 0
Re: Excel VBA Round-off issue - Help needed

I found the way which I learnt from here. Thanks much for your assistance.
 
Upvote 0
Re: Excel VBA Round-off issue - Help needed

So what ended up being the issue?
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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