Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
BLW BLW is offline
external usenet poster
 
Posts: 6
Default a simple macro

Could someone please tell me how to write or give me a macro that checks to
see if the text "#N/A" is in a cell, and if it is, change the text in that
cell to white??
Thank you very much

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default a simple macro

If you want this to happen automatically, it would be much more
efficient to use Conditional Formatting. Choose Format/Conditional
Formatting and enter

CF1: Formula is =ISNA(A1)
Format1: Font/White


(substitute your cell reference).


You could use a macro. One way:

Public Sub WhiteOut()
Dim rCell As Range
For Each rCell In Selection
If rCell.Text = "#N/A" Then rCell.Font.Color = vbWhite
Next rCell
End Sub


In article ,
BLW wrote:

Could someone please tell me how to write or give me a macro that checks to
see if the text "#N/A" is in a cell, and if it is, change the text in that
cell to white??

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default a simple macro

There must be a VBA code but I'd use this:

=IF(ISNA(Formula);Text;Formula))
Then, with conditional formatting, you can set Text to white.

Bart Snel


"BLW" schreef in bericht
...
Could someone please tell me how to write or give me a macro that checks
to
see if the text "#N/A" is in a cell, and if it is, change the text in that
cell to white??
Thank you very much



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
Simple Macro help? The Message Excel Discussion (Misc queries) 2 December 14th 09 05:14 PM
Simple macro MikeD1224 Excel Discussion (Misc queries) 1 June 9th 07 12:06 AM
Simple (?) Macro NeedHelp Excel Discussion (Misc queries) 3 January 21st 07 10:39 PM
Simple macro please sasha New Users to Excel 1 July 19th 05 12:51 PM
simple macro Joe Excel Programming 2 July 16th 04 12:27 AM


All times are GMT +1. The time now is 12:42 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"