Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Summing Multiple Columns

This is really difficult trying to explain a problem without sending an
actual spreadsheet. Here is the data in a more concise format...

Week 1 Week 2
Name Task Hours Name Task Hours
Bill a 10 Bill b 15
Bill b 20 Joe d 15
Sue a 30 Sue a 5
Bill c 10 Bill c 5

I want to get the total number of hours spent on Task "a" across all weeks.
In this example the answer would be 45 (week 1: Bill 10 + Sue 30 + week 2:
Sue 5). This table will have 52 weeks in it.

Any help would be appreciated.

SFO User
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,047
Default Summing Multiple Columns

Assuming

Week1
Name = Column A
Task = Column B
Hours = Column C

Week 2
Name = Column D
Task = Column E
Hours = Column F

=sumproduct(--(b2:b100="a"),(c2:c100))+sumproduct(--(e2:e100="a"),(f2:f100))

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"SFO User" escreveu:

This is really difficult trying to explain a problem without sending an
actual spreadsheet. Here is the data in a more concise format...

Week 1 Week 2
Name Task Hours Name Task Hours
Bill a 10 Bill b 15
Bill b 20 Joe d 15
Sue a 30 Sue a 5
Bill c 10 Bill c 5

I want to get the total number of hours spent on Task "a" across all weeks.
In this example the answer would be 45 (week 1: Bill 10 + Sue 30 + week 2:
Sue 5). This table will have 52 weeks in it.

Any help would be appreciated.

SFO User

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Summing Multiple Columns

Marcelo,

If I have 52 weeks across 150 columns of data... with this formula, wouldn't
the fomula become enormous? I'm trying to avoid creating a monster formula.

Thoughts?

"Marcelo" wrote:

Assuming

Week1
Name = Column A
Task = Column B
Hours = Column C

Week 2
Name = Column D
Task = Column E
Hours = Column F

=sumproduct(--(b2:b100="a"),(c2:c100))+sumproduct(--(e2:e100="a"),(f2:f100))

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"SFO User" escreveu:

This is really difficult trying to explain a problem without sending an
actual spreadsheet. Here is the data in a more concise format...

Week 1 Week 2
Name Task Hours Name Task Hours
Bill a 10 Bill b 15
Bill b 20 Joe d 15
Sue a 30 Sue a 5
Bill c 10 Bill c 5

I want to get the total number of hours spent on Task "a" across all weeks.
In this example the answer would be 45 (week 1: Bill 10 + Sue 30 + week 2:
Sue 5). This table will have 52 weeks in it.

Any help would be appreciated.

SFO User

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Summing Multiple Columns

=SUM(IF(((MOD(COLUMN(B2:EX20),3)=2)*(B2:EX20="a")) ,C2:EY20))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

Note how the colums are offset.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"SFO User" wrote in message
...
Marcelo,

If I have 52 weeks across 150 columns of data... with this formula,
wouldn't
the fomula become enormous? I'm trying to avoid creating a monster
formula.

Thoughts?

"Marcelo" wrote:

Assuming

Week1
Name = Column A
Task = Column B
Hours = Column C

Week 2
Name = Column D
Task = Column E
Hours = Column F

=sumproduct(--(b2:b100="a"),(c2:c100))+sumproduct(--(e2:e100="a"),(f2:f100))

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"SFO User" escreveu:

This is really difficult trying to explain a problem without sending an
actual spreadsheet. Here is the data in a more concise format...

Week 1 Week 2
Name Task Hours Name Task Hours
Bill a 10 Bill b 15
Bill b 20 Joe d 15
Sue a 30 Sue a 5
Bill c 10 Bill c 5

I want to get the total number of hours spent on Task "a" across all
weeks.
In this example the answer would be 45 (week 1: Bill 10 + Sue 30 + week
2:
Sue 5). This table will have 52 weeks in it.

Any help would be appreciated.

SFO User



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Summing Multiple Columns

Bob... you are a genius! I've been looking for this type of a solution for a
long time.

Thanks for your time and effort on this!



"Bob Phillips" wrote:

=SUM(IF(((MOD(COLUMN(B2:EX20),3)=2)*(B2:EX20="a")) ,C2:EY20))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

Note how the colums are offset.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"SFO User" wrote in message
...
Marcelo,

If I have 52 weeks across 150 columns of data... with this formula,
wouldn't
the fomula become enormous? I'm trying to avoid creating a monster
formula.

Thoughts?

"Marcelo" wrote:

Assuming

Week1
Name = Column A
Task = Column B
Hours = Column C

Week 2
Name = Column D
Task = Column E
Hours = Column F

=sumproduct(--(b2:b100="a"),(c2:c100))+sumproduct(--(e2:e100="a"),(f2:f100))

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"SFO User" escreveu:

This is really difficult trying to explain a problem without sending an
actual spreadsheet. Here is the data in a more concise format...

Week 1 Week 2
Name Task Hours Name Task Hours
Bill a 10 Bill b 15
Bill b 20 Joe d 15
Sue a 30 Sue a 5
Bill c 10 Bill c 5

I want to get the total number of hours spent on Task "a" across all
weeks.
In this example the answer would be 45 (week 1: Bill 10 + Sue 30 + week
2:
Sue 5). This table will have 52 weeks in it.

Any help would be appreciated.

SFO User






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Summing Multiple Columns

Bob,

When I insert a column in front the data table it disrupts the formula
listed below and gives me a value of 0. Not fully understanding the formula
yet, what do I need to change in order for it to work again. (when I removed
the additional column, the formula worked again).

Cheers. SFO User

"Bob Phillips" wrote:

=SUM(IF(((MOD(COLUMN(B2:EX20),3)=2)*(B2:EX20="a")) ,C2:EY20))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

Note how the colums are offset.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"SFO User" wrote in message
...
Marcelo,

If I have 52 weeks across 150 columns of data... with this formula,
wouldn't
the fomula become enormous? I'm trying to avoid creating a monster
formula.

Thoughts?

"Marcelo" wrote:

Assuming

Week1
Name = Column A
Task = Column B
Hours = Column C

Week 2
Name = Column D
Task = Column E
Hours = Column F

=sumproduct(--(b2:b100="a"),(c2:c100))+sumproduct(--(e2:e100="a"),(f2:f100))

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"SFO User" escreveu:

This is really difficult trying to explain a problem without sending an
actual spreadsheet. Here is the data in a more concise format...

Week 1 Week 2
Name Task Hours Name Task Hours
Bill a 10 Bill b 15
Bill b 20 Joe d 15
Sue a 30 Sue a 5
Bill c 10 Bill c 5

I want to get the total number of hours spent on Task "a" across all
weeks.
In this example the answer would be 45 (week 1: Bill 10 + Sue 30 + week
2:
Sue 5). This table will have 52 weeks in it.

Any help would be appreciated.

SFO User




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Summing Multiple Columns

=SUM(IF(((MOD(COLUMN(B2:EX20)-COLUMN(B2),3)=0)*(B2:EX20="a")),C2:EY20))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"SFO User" wrote in message
...
Bob,

When I insert a column in front the data table it disrupts the formula
listed below and gives me a value of 0. Not fully understanding the
formula
yet, what do I need to change in order for it to work again. (when I
removed
the additional column, the formula worked again).

Cheers. SFO User

"Bob Phillips" wrote:

=SUM(IF(((MOD(COLUMN(B2:EX20),3)=2)*(B2:EX20="a")) ,C2:EY20))

which is an array formula, it should be committed with Ctrl-Shift-Enter,
not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets),
do
not try to do this manually.
When editing the formula, it must again be array-entered.

Note how the colums are offset.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"SFO User" wrote in message
...
Marcelo,

If I have 52 weeks across 150 columns of data... with this formula,
wouldn't
the fomula become enormous? I'm trying to avoid creating a monster
formula.

Thoughts?

"Marcelo" wrote:

Assuming

Week1
Name = Column A
Task = Column B
Hours = Column C

Week 2
Name = Column D
Task = Column E
Hours = Column F

=sumproduct(--(b2:b100="a"),(c2:c100))+sumproduct(--(e2:e100="a"),(f2:f100))

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"SFO User" escreveu:

This is really difficult trying to explain a problem without sending
an
actual spreadsheet. Here is the data in a more concise format...

Week 1 Week 2
Name Task Hours Name Task Hours
Bill a 10 Bill b 15
Bill b 20 Joe d 15
Sue a 30 Sue a 5
Bill c 10 Bill c 5

I want to get the total number of hours spent on Task "a" across all
weeks.
In this example the answer would be 45 (week 1: Bill 10 + Sue 30 +
week
2:
Sue 5). This table will have 52 weeks in it.

Any help would be appreciated.

SFO User






  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Summing Multiple Columns

Once again, works like a charm!

Thank you.

SFO User

"Bob Phillips" wrote:

=SUM(IF(((MOD(COLUMN(B2:EX20)-COLUMN(B2),3)=0)*(B2:EX20="a")),C2:EY20))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"SFO User" wrote in message
...
Bob,

When I insert a column in front the data table it disrupts the formula
listed below and gives me a value of 0. Not fully understanding the
formula
yet, what do I need to change in order for it to work again. (when I
removed
the additional column, the formula worked again).

Cheers. SFO User

"Bob Phillips" wrote:

=SUM(IF(((MOD(COLUMN(B2:EX20),3)=2)*(B2:EX20="a")) ,C2:EY20))

which is an array formula, it should be committed with Ctrl-Shift-Enter,
not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets),
do
not try to do this manually.
When editing the formula, it must again be array-entered.

Note how the colums are offset.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"SFO User" wrote in message
...
Marcelo,

If I have 52 weeks across 150 columns of data... with this formula,
wouldn't
the fomula become enormous? I'm trying to avoid creating a monster
formula.

Thoughts?

"Marcelo" wrote:

Assuming

Week1
Name = Column A
Task = Column B
Hours = Column C

Week 2
Name = Column D
Task = Column E
Hours = Column F

=sumproduct(--(b2:b100="a"),(c2:c100))+sumproduct(--(e2:e100="a"),(f2:f100))

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"SFO User" escreveu:

This is really difficult trying to explain a problem without sending
an
actual spreadsheet. Here is the data in a more concise format...

Week 1 Week 2
Name Task Hours Name Task Hours
Bill a 10 Bill b 15
Bill b 20 Joe d 15
Sue a 30 Sue a 5
Bill c 10 Bill c 5

I want to get the total number of hours spent on Task "a" across all
weeks.
In this example the answer would be 45 (week 1: Bill 10 + Sue 30 +
week
2:
Sue 5). This table will have 52 weeks in it.

Any help would be appreciated.

SFO User






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 summing multiple columns juliejg1 Excel Worksheet Functions 5 December 13th 07 04:01 PM
Summing columns [email protected] Excel Discussion (Misc queries) 1 March 15th 07 03:27 PM
Summing Columns savv32 Excel Worksheet Functions 4 October 7th 05 01:59 AM
Summing 2 columns TBoe Excel Worksheet Functions 3 April 28th 05 11:37 PM
Not summing a columns? Nicole Excel Worksheet Functions 2 April 23rd 05 03:30 PM


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