Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Sum A Range only if no text is present in the range

I'm trying to create a formula to sum a range of cells, like A1:A10,
but only if all the values are numbers. On occassion I may place the
text "TBD" into a cell and if thats the case I want to sum of the
range to be zero.

This is the latest formula I tried but it didn't work. Any thoughts
would be greatly appreciated.

=SUM(IF(ISTEXT(A1:A10),0,A1:A10))

AJ

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Sum A Range only if no text is present in the range

=if(countif(a1:a10,"TBD")0,0,sum(a1:a10))
or
=sum(A1:A10)*(Countif(a1:a10,"TBD")=0)



AdmiralAJ wrote:

I'm trying to create a formula to sum a range of cells, like A1:A10,
but only if all the values are numbers. On occassion I may place the
text "TBD" into a cell and if thats the case I want to sum of the
range to be zero.

This is the latest formula I tried but it didn't work. Any thoughts
would be greatly appreciated.

=SUM(IF(ISTEXT(A1:A10),0,A1:A10))

AJ


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Sum A Range only if no text is present in the range

On Tue, 19 Jun 2007 23:07:26 -0000, AdmiralAJ wrote:

I'm trying to create a formula to sum a range of cells, like A1:A10,
but only if all the values are numbers. On occassion I may place the
text "TBD" into a cell and if thats the case I want to sum of the
range to be zero.

This is the latest formula I tried but it didn't work. Any thoughts
would be greatly appreciated.

=SUM(IF(ISTEXT(A1:A10),0,A1:A10))

AJ


Dave's formulas are simpler, but you are very close.

=SUM(IF(OR(ISTEXT(A1:A10)),0,A1:A10))

entered as an **array** formula will do the job, also. To enter an **array**
formula, you must hold down <ctrl<shift while hitting <enter. Excel will
place braces {...} around the formula.
--ron
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Sum A Range only if no text is present in the range

On Jun 19, 4:51 pm, Ron Rosenfeld wrote:
On Tue, 19 Jun 2007 23:07:26 -0000, AdmiralAJ wrote:
I'm trying to create a formula to sum a range of cells, like A1:A10,
but only if all the values are numbers. On occassion I may place the
text "TBD" into a cell and if thats the case I want to sum of the
range to be zero.


This is the latest formula I tried but it didn't work. Any thoughts
would be greatly appreciated.


=SUM(IF(ISTEXT(A1:A10),0,A1:A10))


AJ


Dave's formulas are simpler, but you are very close.

=SUM(IF(OR(ISTEXT(A1:A10)),0,A1:A10))

entered as an **array** formula will do the job, also. To enter an **array**
formula, you must hold down <ctrl<shift while hitting <enter. Excel will
place braces {...} around the formula.
--ron


Dave and Ron,

Thanks...both of those worked great!!

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
Search range for text not in another range simon howard Excel Discussion (Misc queries) 3 March 28th 07 08:44 PM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
conditional formula: sum a range if text present in another range NeedAdvice777 Excel Discussion (Misc queries) 10 August 29th 06 04:51 PM
How to count dates within a certain range in a column with mutiple date range entries Krisjhn Excel Worksheet Functions 2 September 1st 05 01:59 PM
convert a range of lowercase text to upper text or vice versa jackdaw Excel Worksheet Functions 2 May 16th 05 09:31 PM


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