LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 187
Default return an empty string in VBA

I'm trying to use the following code to return an empty string in a
range of cells if any value in the range is FALSE:

Application.EnableEvents = False
For Each R In Range("A1:A7")
If R.Value = False Then R.Value = ""
Next
Application.EnableEvents = True

The problem is this code returns the actual quote marks "" in the
cells, not an empty string. R is set as a variant.

What am I doing wrong?

Thanks.

Dave

 
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
Help on filling empty cells with string + row() John Smith Excel Discussion (Misc queries) 1 July 14th 06 04:44 AM
Return an empty or blank cell value? Troymello Excel Worksheet Functions 0 March 3rd 06 05:19 PM
return an EMPTY cell in an IF formula JJN Excel Discussion (Misc queries) 3 February 10th 06 04:14 PM
Return an empty cell Mike D. Excel Discussion (Misc queries) 2 January 3rd 06 06:27 PM
how do I remove empty spaces trailing a text string? Need_Help Excel Worksheet Functions 2 June 7th 05 12:13 AM


All times are GMT +1. The time now is 08:16 PM.

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

About Us

"It's about Microsoft Excel"