Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Sum cells using criteria from a row and a column

I am trying to sum cells in a sheet based on matching criteria in a row and
matching criteria in a column.

The data that I am working with is represented as:

Resource: Resource1 JAN JAN JAN JAN FEB
Project Project Description 12/19 12/26 1/2 1/9 1/16
Admin Administration 10 10 10
10 10
Holiday Holiday 8
8
Other Other time Off
Training Training 20
Vacation Vacation 22 30 10 30 22

I am looking to create a separate sheet that is a summary of this
information.
I want to match on the project (column A) and the Month (Row 1), where the
project from the detail resource sheet matches the project from the summary
sheet and the month from the detail sheet matches the month on the summary
sheet, I want to summ the hours.

I have tried several iterations of the SUM(IF), SUMIF, and SUMPRODUCT and I
either get all cells that match a project, regardless of the month or I get
errors in the formula.

Help!!!!!!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Sum cells using criteria from a row and a column

Raul,

If your month's data is a single column, and the column headings are labels rather than actual
dates:

=SUMIF(Sheet2!A:A,B3,INDEX(Sheet2!1:65536,,MATCH(B 4,Sheet2!1:1,FALSE)))

Where B3 has the Project, and B4 has the Month entered in a way that matches the column header
labels.

If you have mutliple labels for months, then try array entering (enter using Ctrl-Shift-Enter) a
formula like

=SUM(IF(Sheet2!A1:A100=B3,OFFSET(Sheet2!$A$1,0,MAT CH(B4,Sheet2!1:1,FALSE)-1,100,COUNTIF(Sheet2!1:1,B4))))

If you have actual dates in row 1 and in cell B4, then array enter a formula like

=SUM(IF(Sheet2!A1:A100=B3,OFFSET(Sheet2!$A$1,0,MAT CH(TEXT(B4,"mmm"),TEXT(Sheet2!A1:H1,"mmm"),FALSE)-1,100,SUMPRODUCT((TEXT(Sheet2!A1:H1,"mmm")=TEXT(B4 ,"mmm"))*1))))

for which I have assumed that you have 8 columns (A to H) and 100 rows of data.

HTH,
Bernie
MS Excel MVP


"Raul" wrote in message
...
I am trying to sum cells in a sheet based on matching criteria in a row and
matching criteria in a column.

The data that I am working with is represented as:

Resource: Resource1 JAN JAN JAN JAN FEB
Project Project Description 12/19 12/26 1/2 1/9 1/16
Admin Administration 10 10 10
10 10
Holiday Holiday 8
8
Other Other time Off
Training Training 20
Vacation Vacation 22 30 10 30 22

I am looking to create a separate sheet that is a summary of this
information.
I want to match on the project (column A) and the Month (Row 1), where the
project from the detail resource sheet matches the project from the summary
sheet and the month from the detail sheet matches the month on the summary
sheet, I want to summ the hours.

I have tried several iterations of the SUM(IF), SUMIF, and SUMPRODUCT and I
either get all cells that match a project, regardless of the month or I get
errors in the formula.

Help!!!!!!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Sum cells using criteria from a row and a column

Thank you. The second example you gave is the situation I have and it worked
out quite well.

"Bernie Deitrick" wrote:

Raul,

If your month's data is a single column, and the column headings are labels rather than actual
dates:

=SUMIF(Sheet2!A:A,B3,INDEX(Sheet2!1:65536,,MATCH(B 4,Sheet2!1:1,FALSE)))

Where B3 has the Project, and B4 has the Month entered in a way that matches the column header
labels.

If you have mutliple labels for months, then try array entering (enter using Ctrl-Shift-Enter) a
formula like

=SUM(IF(Sheet2!A1:A100=B3,OFFSET(Sheet2!$A$1,0,MAT CH(B4,Sheet2!1:1,FALSE)-1,100,COUNTIF(Sheet2!1:1,B4))))

If you have actual dates in row 1 and in cell B4, then array enter a formula like

=SUM(IF(Sheet2!A1:A100=B3,OFFSET(Sheet2!$A$1,0,MAT CH(TEXT(B4,"mmm"),TEXT(Sheet2!A1:H1,"mmm"),FALSE)-1,100,SUMPRODUCT((TEXT(Sheet2!A1:H1,"mmm")=TEXT(B4 ,"mmm"))*1))))

for which I have assumed that you have 8 columns (A to H) and 100 rows of data.

HTH,
Bernie
MS Excel MVP


"Raul" wrote in message
...
I am trying to sum cells in a sheet based on matching criteria in a row and
matching criteria in a column.

The data that I am working with is represented as:

Resource: Resource1 JAN JAN JAN JAN FEB
Project Project Description 12/19 12/26 1/2 1/9 1/16
Admin Administration 10 10 10
10 10
Holiday Holiday 8
8
Other Other time Off
Training Training 20
Vacation Vacation 22 30 10 30 22

I am looking to create a separate sheet that is a summary of this
information.
I want to match on the project (column A) and the Month (Row 1), where the
project from the detail resource sheet matches the project from the summary
sheet and the month from the detail sheet matches the month on the summary
sheet, I want to summ the hours.

I have tried several iterations of the SUM(IF), SUMIF, and SUMPRODUCT and I
either get all cells that match a project, regardless of the month or I get
errors in the formula.

Help!!!!!!



.

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
Add cells using a diffrent column as the criteria Shaun Excel Discussion (Misc queries) 1 July 17th 09 06:44 PM
compare cells in column to criteria, then average next column cell Bradwin Excel Worksheet Functions 2 July 21st 08 08:37 PM
how can I average more cells only in a column by a criteria? Alinutza Excel Worksheet Functions 3 October 11th 06 06:58 PM
Need formula that will sum cells in a column bases on criteria in other cells. Jim Excel Worksheet Functions 3 February 18th 06 03:33 PM
add a column only if 5 other cells on the row satisfy criteria zubin Excel Worksheet Functions 1 September 14th 05 09:27 AM


All times are GMT +1. The time now is 05:57 PM.

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"