#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default sumproduct or sumif?

Excel 2003

On the first sheet (FY2007MonthlyCosts), I have names in column A. Column
B, D, F, etc has hours. Column C, E, G has dollars. I sum the hours and
dollars in cells IU and IV with this:
SUMIF($B$4:$IT$4,"hours",B5:IT5)
SUMIF($B$4:$IT$4,"Dollars",B5:IT5)

These are copied down for each name (row).

On the second sheet (FY2007Summary), I use another sumif to find the data by
name.
SUMIF('FY2007Monthly Costs'!A5:A38,FY2007Summary!A6,'FY2007Monthly
Costs'!IU5:IU38)

This works but I was looking for an easier one step formula to use on the
Summary sheet.




  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default sumproduct or sumif?

Hours =VLOOKUP(A6,'FY2007Monthly Costs'!A5:IV38,255,0)
Dollars = VLOOKUP(A6,'FY2007Monthly Costs'!A5:IV38,256,0)

To make it even easier, rename 'FY2007Monthly Costs'!A5:IV38 to a named
range (like EntireList) then your vlookups can just be:
=VLOOKUP(A6,EntireList,255,0)
=VLOOKUP(A6,EntireList,256,0)

Note that if the value in A6 does not appear in your master list, you'll get
an #N/A! error.
--
Please remember to indicate when the post is answered so others can benefit
from it later.


"SixBowls" wrote:

Excel 2003

On the first sheet (FY2007MonthlyCosts), I have names in column A. Column
B, D, F, etc has hours. Column C, E, G has dollars. I sum the hours and
dollars in cells IU and IV with this:
SUMIF($B$4:$IT$4,"hours",B5:IT5)
SUMIF($B$4:$IT$4,"Dollars",B5:IT5)

These are copied down for each name (row).

On the second sheet (FY2007Summary), I use another sumif to find the data by
name.
SUMIF('FY2007Monthly Costs'!A5:A38,FY2007Summary!A6,'FY2007Monthly
Costs'!IU5:IU38)

This works but I was looking for an easier one step formula to use on the
Summary sheet.




  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default sumproduct or sumif?

Thanks. That works but I was trying to get a formula that would work without
doing the SumIf on the monthly costs tab.

"Queso" wrote:

Hours =VLOOKUP(A6,'FY2007Monthly Costs'!A5:IV38,255,0)
Dollars = VLOOKUP(A6,'FY2007Monthly Costs'!A5:IV38,256,0)

To make it even easier, rename 'FY2007Monthly Costs'!A5:IV38 to a named
range (like EntireList) then your vlookups can just be:
=VLOOKUP(A6,EntireList,255,0)
=VLOOKUP(A6,EntireList,256,0)

Note that if the value in A6 does not appear in your master list, you'll get
an #N/A! error.
--
Please remember to indicate when the post is answered so others can benefit
from it later.


"SixBowls" wrote:

Excel 2003

On the first sheet (FY2007MonthlyCosts), I have names in column A. Column
B, D, F, etc has hours. Column C, E, G has dollars. I sum the hours and
dollars in cells IU and IV with this:
SUMIF($B$4:$IT$4,"hours",B5:IT5)
SUMIF($B$4:$IT$4,"Dollars",B5:IT5)

These are copied down for each name (row).

On the second sheet (FY2007Summary), I use another sumif to find the data by
name.
SUMIF('FY2007Monthly Costs'!A5:A38,FY2007Summary!A6,'FY2007Monthly
Costs'!IU5:IU38)

This works but I was looking for an easier one step formula to use on the
Summary sheet.




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default sumproduct or sumif?

I think the way you're doing it is fine. SUMPRODUCT is only needed when you
have more than one criteria (so "hours" and perhaps "dates" too, or "hours"
and a specific person...your need is already limited to a single row, so
there's only 1 criteria and SUMIF is fine).
--
Please remember to indicate when the post is answered so others can benefit
from it later.


"SixBowls" wrote:

Thanks. That works but I was trying to get a formula that would work without
doing the SumIf on the monthly costs tab.

"Queso" wrote:

Hours =VLOOKUP(A6,'FY2007Monthly Costs'!A5:IV38,255,0)
Dollars = VLOOKUP(A6,'FY2007Monthly Costs'!A5:IV38,256,0)

To make it even easier, rename 'FY2007Monthly Costs'!A5:IV38 to a named
range (like EntireList) then your vlookups can just be:
=VLOOKUP(A6,EntireList,255,0)
=VLOOKUP(A6,EntireList,256,0)

Note that if the value in A6 does not appear in your master list, you'll get
an #N/A! error.
--
Please remember to indicate when the post is answered so others can benefit
from it later.


"SixBowls" wrote:

Excel 2003

On the first sheet (FY2007MonthlyCosts), I have names in column A. Column
B, D, F, etc has hours. Column C, E, G has dollars. I sum the hours and
dollars in cells IU and IV with this:
SUMIF($B$4:$IT$4,"hours",B5:IT5)
SUMIF($B$4:$IT$4,"Dollars",B5:IT5)

These are copied down for each name (row).

On the second sheet (FY2007Summary), I use another sumif to find the data by
name.
SUMIF('FY2007Monthly Costs'!A5:A38,FY2007Summary!A6,'FY2007Monthly
Costs'!IU5:IU38)

This works but I was looking for an easier one step formula to use on the
Summary sheet.




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
SUMIF or SUMPRODUCT ????????? hoyos Excel Discussion (Misc queries) 4 November 3rd 09 11:57 AM
SumIF or SumProduct DS Excel Discussion (Misc queries) 2 September 22nd 09 08:12 PM
HELP Sumif or Sumproduct Cathy Excel Discussion (Misc queries) 1 March 15th 07 03:03 PM
Sumif or Sumproduct Justine Burn via OfficeKB.com Excel Worksheet Functions 4 March 11th 05 12:42 AM
Sumif not Sumproduct David Excel Worksheet Functions 4 December 8th 04 11:39 AM


All times are GMT +1. The time now is 10:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"