Jack-P-Winner
Member
I have cells that are all color coded and very important that they are. For some reason when I copy and paste numbers from one sheet to the next or from a web site. I have to run a Macro to "fix" them because the CF will not work "at all" I am not sure of a couple things.
1. Is the format of the numbers incorrect?
2. Can my Macro be fixed to prevent it from taking away my CF when it runs?
This has been a nuisance for a long time. I've given you two example, the example off to the right you can run the Macro that says FIX NUM and you will the formula disappears after the color code is applied. The CF always seems to work under SET 1 but not SET 2
Here is the Macro and I uploaded an example and thank you for your help once again
Thanks
1. Is the format of the numbers incorrect?
2. Can my Macro be fixed to prevent it from taking away my CF when it runs?
This has been a nuisance for a long time. I've given you two example, the example off to the right you can run the Macro that says FIX NUM and you will the formula disappears after the color code is applied. The CF always seems to work under SET 1 but not SET 2
Here is the Macro and I uploaded an example and thank you for your help once again
Code:
Sub changetonumber()
Dim cell As Range, s As Variant
For Each cell In Selection
s = Trim(cell.Value)
If IsNumeric(s) Then
cell.Value = CInt(s)
End If
Next
End Sub
Thanks