Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default numbers to characters

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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default numbers to characters


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


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=563972

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to generate sets of random numbers without having duplicates William Excel Worksheet Functions 1 June 6th 06 05:30 AM
Why are 1/2 my numbers imported as text and the rest as numbers? KBear Excel Discussion (Misc queries) 2 April 21st 06 01:40 PM
Deleting characters that are not numbers jermsalerms Excel Discussion (Misc queries) 4 January 12th 06 08:06 PM
how to format only specific characters or numbers within each cellwithin a range of cells Colleen Excel Discussion (Misc queries) 4 September 12th 05 10:04 PM
Binary Numbers longer than 10 characters Andibevan Excel Worksheet Functions 2 April 6th 05 10:08 PM


All times are GMT +1. The time now is 12:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"