Link to home
Start Free TrialLog in
Avatar of LUIS FREUND
LUIS FREUND

asked on

Modify VBA to copy and paste.

I have this VBA code that copies and paste and it works great except when I have this in a cell:  744350E00, when I run the code it changes it to 7.44E+05.  I wanted to keep the same format.   Below is the code.  Can the code be modified to not convert it to a scientific format?

Sub Sort()
With Worksheets("MAIN_PN").Range("A4:K500")
    .Value = .Value
End With
End Sub
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Format the cell as Text.
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LUIS FREUND
LUIS FREUND

ASKER

AWESOME!  THANK YOU!
You're welcome Luis!