Hi,
I have an excel input box that prompts the user to enter in a person's temporary pay rate if it finds a certain code in another column. If the user enters in a pay rate with cents in it such as 40.66 or 39.50 it rounds the number off to 41 or 40. How can I get it to keep the cents and round to 2 or even 4 decimal places? I tried inserting this into the vba code prior to the input box code:
'Name column U Temp Rate and format it to 2 decimal places
Range("U1").Select
ActiveCell.FormulaR1C1 = "Temp Rate"
Columns("U:U").Select
Selection.NumberFormat = "#,##0.0000"
Thanks,
Ken
I have an excel input box that prompts the user to enter in a person's temporary pay rate if it finds a certain code in another column. If the user enters in a pay rate with cents in it such as 40.66 or 39.50 it rounds the number off to 41 or 40. How can I get it to keep the cents and round to 2 or even 4 decimal places? I tried inserting this into the vba code prior to the input box code:
'Name column U Temp Rate and format it to 2 decimal places
Range("U1").Select
ActiveCell.FormulaR1C1 = "Temp Rate"
Columns("U:U").Select
Selection.NumberFormat = "#,##0.0000"
Thanks,
Ken