View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave O Dave O is offline
external usenet poster
 
Posts: 427
Default Refresh Data in Excel Spreadsheet

What's up, Doc?

This happens to me often enough that I wrote some code to handle it.
Highlight the range of data, then run this code. Enjoy the weekend!

Sub Selected_Range_Format()
Dim rCell As Range
Dim TrueVal As Variant

For Each rCell In Selection.Cells
TrueVal = Trim(rCell.Value)
rCell.ClearContents
rCell.NumberFormat = "$#,##0.00"
rCell.Value = TrueVal
Next rCell
End Sub