Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Adding multiple cells meeting criteria

I am using Excel 2003. I have a few sheets in one workbook each containing
monthly data. Data from each month needs to go on a year to date sheet. Say
in my monthly sheets A10:A20 contain a "Position" and B10:B20 contains
numbers based on that "Position". Each month may or may not contain the same
"Positions" in A10:A20. I need a function to add up the numbers for each
"Position" if it appears in any given month. For example, "Position" AR-01
may appear in July and September and in different cells in those months in
the A column. I need my YTD sheet containing all possible "Positions" to
find the number in the B culumn associated with the "Position" in the A
column and add the year's data up.
--
Mike
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Adding multiple cells meeting criteria

One easy set-up using SUMIF, with INDIRECT providing some extra flexibility

In your YTD summary sheet,
List the monthly sheetnames in B1 across, eg: July, August, etc
List the "Positions" in A2 down, eg: AR-01
(Sheetnames listed must match exactly with what's on the tabs, except for
case)

Then you could place this in B2:
=SUMIF(INDIRECT("'"&C$1&"'!A:A"),$A2,INDIRECT("'"& C$1&"'!B:B"))
Copy B2 across/fill down to populate
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:18,400 Files:361 Subscribers:58
xdemechanik
---
"Mike" wrote:
I am using Excel 2003. I have a few sheets in one workbook each containing
monthly data. Data from each month needs to go on a year to date sheet. Say
in my monthly sheets A10:A20 contain a "Position" and B10:B20 contains
numbers based on that "Position". Each month may or may not contain the same
"Positions" in A10:A20. I need a function to add up the numbers for each
"Position" if it appears in any given month. For example, "Position" AR-01
may appear in July and September and in different cells in those months in
the A column. I need my YTD sheet containing all possible "Positions" to
find the number in the B culumn associated with the "Position" in the A
column and add the year's data up.
--
Mike

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Adding multiple cells meeting criteria

Errata, formula should read:
... in B2:
=SUMIF(INDIRECT("'"&B$1&"'!A:A"),$A2,INDIRECT("'"& B$1&"'!B:B"))
Copy B2 across/fill down to populate
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:18,400 Files:361 Subscribers:58
xdemechanik
---
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Adding multiple cells meeting criteria

Thank you very much for your help. I am getting #REF! when I put in the
formula. A9 has my heading "Position", B9 is heading "Lenses", C9 is heading
Cost. I have separate departments listed on the same sheet. Each department
may have a couple "Position" names that are the same, but have different data
from each other. Example - Position AR-01 may be in 2 or 3 departments
depending on the month but each have different values in the Lenses and Cost
columns. A9:A30 contains department XYZ, A37:A32 contains department
ABC....for 7 departments. Each have the same headings for the columns.
--
Mike


"Max" wrote:

Errata, formula should read:
.. in B2:
=SUMIF(INDIRECT("'"&B$1&"'!A:A"),$A2,INDIRECT("'"& B$1&"'!B:B"))
Copy B2 across/fill down to populate
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:18,400 Files:361 Subscribers:58
xdemechanik
---

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Adding multiple cells meeting criteria

.. I am getting #REF! when I put in the formula.
That usually means your sheetnames listed in B1 across
somehow doesn't match exactly with what's on the tabs

Easier to see things if you could upload your sample
using a free filehost, then post a link to it here

For example, you could use this free filehost to upload:
http://www.freefilehosting.net/

Copy the "direct link" which is generated after you upload,
then paste it here

(Desensitize your sample as appropriate)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:18,500 Files:361 Subscribers:58
xdemechanik
---
"Mike" wrote:
Thank you very much for your help. I am getting #REF! when I put in the
formula. A9 has my heading "Position", B9 is heading "Lenses", C9 is heading
Cost. I have separate departments listed on the same sheet. Each department
may have a couple "Position" names that are the same, but have different data
from each other. Example - Position AR-01 may be in 2 or 3 departments
depending on the month but each have different values in the Lenses and Cost
columns. A9:A30 contains department XYZ, A37:A32 contains department
ABC....for 7 departments. Each have the same headings for the columns.
--
Mike


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
calculate total items meeting criteria in range with multiple shee twototango Excel Worksheet Functions 2 May 30th 08 04:49 AM
Adding up data in multiple cells for a single criteria. Philip Excel Worksheet Functions 1 April 5th 06 11:30 AM
Totals based on meeting multiple criteria JerryS Excel Worksheet Functions 3 January 8th 06 09:35 PM
Show top five records based on meeting multiple criteria Joe D Excel Worksheet Functions 4 November 20th 05 11:51 PM
Counting the number of cells meeting conditional formating criteria Jeff Excel Worksheet Functions 4 July 9th 05 01:18 AM


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