numbers to characters

  • Thread starter Thread starter George Applegate
  • Start date Start date
G

George Applegate

I have a spreadsheet that is externally linked to a query. In four
colums are phone number information - area code, number, fax area code
and fax number. When the data is imported, some of the fields are
zero. I can format the column that if it's zero to show blank by
using a custom edit code. But...the number is still there, and zero,
even if it doesn't display as such.

Of course I can also do a find/replace on the four columns, but I'd
like to figure out a way that when the data comes in it automatically
replaces any cells in these four columns that have a zero with blanks.
Like the cell contains no data at all.

Is there a way to accomplish this?

thanks,
ga
George Applegate
(e-mail address removed)
 
This simple VBA code should do it

Could make it a Event producre or just add a macro button. It assumes
data starts in "A1".


Sub Remove_zero()
'
Range("A1").Select
Selection.CurrentRegion.Select
Selection.Replace What:="0", Replacement:=""
Range("A1").Select
End Sub

VBA Noob
 
Back
Top