Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default IF and ISBlank for a selected range of cells

Using Excel 207 and want to search in a particular range (A1:A31) to
determine if all cells are blanks, [true] would return a blank, [false] would
sum the range (A1:A31) then divide by number of hits within that range.

A
1 25
2
3 100
4 75
... 25
30 49
31 89

How would I write the formula? Unable to define range names because of the
size of data and updates to date. I tired this, but it doesn't work.

=+IF(ISBLANK(A1:A31),"",SUM(A1:A31)/31)
Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default IF and ISBlank for a selected range of cells

You can give this a try... I think it is what you want...

=IF(COUNT(A1:A31)=0,0,AVERAGE(A1:A31))
--
HTH...

Jim Thomlinson


"NavyMom" wrote:

Using Excel 207 and want to search in a particular range (A1:A31) to
determine if all cells are blanks, [true] would return a blank, [false] would
sum the range (A1:A31) then divide by number of hits within that range.

A
1 25
2
3 100
4 75
.. 25
30 49
31 89

How would I write the formula? Unable to define range names because of the
size of data and updates to date. I tired this, but it doesn't work.

=+IF(ISBLANK(A1:A31),"",SUM(A1:A31)/31)
Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default IF and ISBlank for a selected range of cells

You could use =count() to see how many numbers are in the cell.

Then use =average() instead of sum/count.

=if(count(a1:a31)=0,"No numbers",average(a1:a31))

Or if you really wanted:

=if(count(a1:a31)=0,"No numbers",sum(a1:a31)/count(a1:a31))



NavyMom wrote:

Using Excel 207 and want to search in a particular range (A1:A31) to
determine if all cells are blanks, [true] would return a blank, [false] would
sum the range (A1:A31) then divide by number of hits within that range.

A
1 25
2
3 100
4 75
.. 25
30 49
31 89

How would I write the formula? Unable to define range names because of the
size of data and updates to date. I tired this, but it doesn't work.

=+IF(ISBLANK(A1:A31),"",SUM(A1:A31)/31)
Thanks


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default IF and ISBlank for a selected range of cells

Thanks,
This helps a lot.
NavyMom

"Dave Peterson" wrote:

You could use =count() to see how many numbers are in the cell.

Then use =average() instead of sum/count.

=if(count(a1:a31)=0,"No numbers",average(a1:a31))

Or if you really wanted:

=if(count(a1:a31)=0,"No numbers",sum(a1:a31)/count(a1:a31))



NavyMom wrote:

Using Excel 207 and want to search in a particular range (A1:A31) to
determine if all cells are blanks, [true] would return a blank, [false] would
sum the range (A1:A31) then divide by number of hits within that range.

A
1 25
2
3 100
4 75
.. 25
30 49
31 89

How would I write the formula? Unable to define range names because of the
size of data and updates to date. I tired this, but it doesn't work.

=+IF(ISBLANK(A1:A31),"",SUM(A1:A31)/31)
Thanks


--

Dave Peterson

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
How do I set a range to the currently selected cells? [email protected] Excel Programming 2 January 4th 08 11:54 AM
Step through cells in a selected range CLR Excel Programming 0 November 21st 07 05:57 PM
Set Range Using Selected Cells Paputxi Excel Programming 3 May 2nd 06 06:32 PM
Compare a selected Range with a Named range and select cells that do not exist PCLIVE Excel Programming 1 October 18th 05 07:09 PM
max/min of a selected range of cells Srikanth Ganesan[_2_] Excel Programming 1 September 1st 04 10:31 PM


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