#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default Sum formula

In table format

code hrs code hrs code hrs total
10 8 20 8 42 10 16
12 6 11 1 40 8 15
I need to sum hrs where the code does not equal 42 for each row. What is the
best way to accomplish task?
--
Bonita
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Sum formula

=SUMPRODUCT(--($B$1:$F$1="hrs"),--(A2:E2<42),(B2:F2))

With nice headers in row 1.

Notice how the headers look at B:F, but the codes look at A:E, and we sum B:F.



Bonita wrote:

In table format

code hrs code hrs code hrs total
10 8 20 8 42 10 16
12 6 11 1 40 8 15
I need to sum hrs where the code does not equal 42 for each row. What is the
best way to accomplish task?
--
Bonita


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default Sum formula

Thanks!!!
--
Bonita


"Dave Peterson" wrote:

=SUMPRODUCT(--($B$1:$F$1="hrs"),--(A2:E2<42),(B2:F2))

With nice headers in row 1.

Notice how the headers look at B:F, but the codes look at A:E, and we sum B:F.



Bonita wrote:

In table format

code hrs code hrs code hrs total
10 8 20 8 42 10 16
12 6 11 1 40 8 15
I need to sum hrs where the code does not equal 42 for each row. What is the
best way to accomplish task?
--
Bonita


--

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
Reusing formula Tony29 Excel Discussion (Misc queries) 7 September 7th 06 03:34 AM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM


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