View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
 
Posts: n/a
Default Test for data in a range of cells

On Fri, 20 Jan 2006 12:02:26 -0500, "Spike9458"
wrote:

Hi all,

I am working on a spreadsheet that is a little over 10000 lines long.
Several columns seem to not have any data, but I am reluctant to just delete
them. What sort of function can I used to see if there is any data in a
given column that will just return the result of true or false, text present
or not present?

Thank-you for your help.

--Jim


Do you just want to know if text is present? (as you wrote) or do you really
want to know if the column contains only empty cells?

You could use the array formulas for this:

=AND(ISBLANK(G1:G5535))

to test column G. This will return FALSE if there are any entries in that
column, including formulas that return null strings, the various white-space
characters, and so forth. Otherwise it will return TRUE.

If you are looking for just text, you could use the array-formula:

=OR(ISTEXT(G1:G65535))

which will return TRUE if there is text (null strings and white-space count as
text), and false otherwise.

To enter an array-formula, after typing it into the formula bar, hold down
<ctrl<shift while hitting <enter. Excel will place braces {...} around the
formula
--ron