Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-01-2011, 10:20 AM
lawnG lawnG is offline Range Lookup for Totals?  Confused Windows XP Range Lookup for Totals?  Confused Office 2003
Novice
Range Lookup for Totals?  Confused
 
Join Date: Jan 2011
Posts: 2
lawnG is on a distinguished road
Default Range Lookup for Totals? Confused

***question is for excel 2003***



In the attached spreadsheet, i'm having problems getting the total hours and amount based on a certain account number.

I would like to sum the total hours and amount for account number 9 ONLY. And everything other than acct 9, sum as well.

Any help would be greatly appreciated. Thanks!
Attached Files
File Type: xls help.xls (13.5 KB, 9 views)
Reply With Quote
  #2  
Old 02-01-2011, 10:42 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline Range Lookup for Totals?  Confused Windows 7 32bit Range Lookup for Totals?  Confused Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

To get the sum of column D (hours) where column B (account number) is 9, you can use this formula in cell D12:
Code:
=SUMIF(B4:B9,9,D4:D9)
To get the sum of column E (amount) where column B (account number) is 9, you can use this formula in cell E12:
Code:
=SUMIF(B4:B9,9,E4:E9)

To get the sum of column D (hours) where column B (account number) is not equal to 9, you could use either of these formulas:
Code:
=SUMIF(B4:B9,"<>9",D4:D9)
 
=D14-D12

To get the sum of column E (hours) where column B (account number) is not equal to 9, you could use either of these formulas:
Code:
=SUMIF(B4:B9,"<>9",E4:E9)
 
=E14-E12
Instead of typing the constant "9" in the formula, you could put it in a cell and reference that cell. This is generally considered to be better practice: if you change cell C12 to 9 instead of Acct 9 Total then the formulas would be:
Code:
=SUMIF(B4:B9,C12,D4:D9)
=SUMIF(B4:B9,C12,E4:E9)
=SUMIF(B4:B9,"<>"&C12,D4:D9)
=SUMIF(B4:B9,"<>"&C12,E4:E9)
etc...
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Range Lookup for Totals?  Confused Field Lookup - Confused lawnG Word Tables 1 01-31-2011 03:50 PM
Creating Lookup in Excel vikash kumar Excel 2 12-06-2010 06:50 AM
Range Lookup for Totals?  Confused Using the LOOKUP Command Grapejuice Excel 2 10-15-2008 02:02 PM
Please help with Sum formula to add totals by State! asap dutch4fire23 Excel 0 07-28-2006 12:41 PM
Range Lookup for Totals?  Confused Need Backup/Export - confused! Robin12265 Outlook 2 06-04-2006 10:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:25 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft