View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Quick Formula question..

On Fri, 17 Jun 2005 15:43:06 -0500, DejaVu
wrote:


Also, I'm doing some work on another cell.

I have this formula in J157:
=IF(COUNTA(C:C)-14=0,0,IF(C4="",COUNTA(C:C)-14,COUNTA(C:C)-15))

It looks through column C for anything entered (supposed to be customer
names). The problem is that it counts if anything is in there, and
sometimes my users hit the space bar to clear out old data. It will
count the spaces. I want this to either not count the ones with only
spaces or not allow only spaces (it could possibly delete spaces when
entered). Again, I'm not sure if this can even be done at all!! Thanks
again for your help.

DejaVu


You could either use Data Validation to disallow, for example, a leading
<space, assuming that is nothing that should be entered. Just put appropriate
error messages so your users know what they did wrong.

e.g. =LEFT(C1,1)< " "

or you could use another event macro to clear the cell if the user entered a
<space and nothing else.


--ron