Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Clearing a cell

How can you clear a cell in a formula? I want something similar to:

IF(<SomeCondition,"Text","")

But if I use that, and then try to count non-blank cells, the cells where "" was stored are not considered blank. How can I actually make the cell blank in that formula? Thanks.

Jerry
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Clearing a cell

Putting any formula in A1 makes it non-blank.

That is =ISBLANK(A1) will return FALSE

You need VBA:

if {condition} then
CELLS(1,1) = "TEXT"
else
CELLS(1,1).Clear
endif
--
Gary's Student


"news.microsoft.com" wrote:

How can you clear a cell in a formula? I want something similar to:

IF(<SomeCondition,"Text","")

But if I use that, and then try to count non-blank cells, the cells where "" was stored are not considered blank. How can I actually make the cell blank in that formula? Thanks

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
Clearing a cell based on the value of another cell (INDIRECT data) without macros Cosi About this forum 0 June 15th 10 03:30 PM
Clearing cells without clearing formulas marsjune68 Excel Discussion (Misc queries) 2 April 10th 09 07:39 PM
Clearing a cell basil Excel Discussion (Misc queries) 4 April 30th 07 11:28 AM
clearing a cell genevieveg Excel Discussion (Misc queries) 1 January 11th 06 01:26 AM
Clearing a cell frustratedwthis Excel Discussion (Misc queries) 1 May 23rd 05 09:47 PM


All times are GMT +1. The time now is 12:36 AM.

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"