Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Geo Geo is offline
external usenet poster
 
Posts: 66
Default sum only if there is a value in cells

I have the following formula:
A3=SUM(A1+A2)
Is there a way so that A3 only sums if there is a value in both cells and
not if there is text?
The values are hours and minutes.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default sum only if there is a value in cells

=IF(AND(ISNUMBER(A1),ISNUMBER(A2)),A1+A2,"")

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Geo" wrote:

I have the following formula:
A3=SUM(A1+A2)
Is there a way so that A3 only sums if there is a value in both cells and
not if there is text?
The values are hours and minutes.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default sum only if there is a value in cells

=IF(AND(ISNUMBER(A1),ISNUMBER(A2)),A1+A2,"")

=IF(COUNT(A1:A2)=2,A1+A2,"")

--
Biff
Microsoft Excel MVP


"Luke M" wrote in message
...
=IF(AND(ISNUMBER(A1),ISNUMBER(A2)),A1+A2,"")

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Geo" wrote:

I have the following formula:
A3=SUM(A1+A2)
Is there a way so that A3 only sums if there is a value in both cells and
not if there is text?
The values are hours and minutes.



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
Excel: match two cells in one sheet to two cells in another and return a third cells value Spence Excel Worksheet Functions 3 February 13th 11 05:33 AM
Cells won't change font color or show hi-lighted cells in document ROBIN Excel Discussion (Misc queries) 1 March 27th 08 09:39 PM
display a range of cells editible cells based on matching date Miki Excel Worksheet Functions 0 October 10th 07 03:27 PM
Setting of input cells as blue font and formula cells as black fon Sunnyskies Excel Discussion (Misc queries) 2 May 14th 07 05:27 PM
trying to create an (almost) circular formula between cells and data validated cells with lists KR Excel Worksheet Functions 0 May 12th 05 07:21 PM


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