I have a problem with a Percent value.
I overcame initial problems by passing the 2 values as integers and when i divided them i made the result Double.
This now works ok and is stored in a variable "PerCent".
I have now used this code to paste the value into a cell on the active worksheet :
(Note: MIDS is the activecell)
MIDS.Offset(2, 1).Value = PerCent
MIDS.Offset(2, 1).NumberFormat = "0.00%"
MIDS.Offset(2, 1).Select
ActiveCell = MIDS.Offset(2,1)
ActiveCell.Value = ActiveCell.Value
However there are 2 values. The one i want which appears as normal - 29.89%
, but if i select the cell by clicking it with the LMB i get the value - 29.8941798941799% appearing !!!
Please could someone tell me what code to add to the above lines to make sure only the - 29.89% value is in the cell and the unformatted value is not.
TIA
Bookmarks