Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Adding based on Multiple Criteria?

I'm sure there's an easy solution to this, but I can't figure it out... can
anyone assist?

I'm currently working on a budget for our company. We code things by
project (two letter code, example "CB") and each project has the same account
numbers (ex: 5421).

We previously had each project's budget on individual worksheets, but it's
so inefficient and I'm trying to get my supervisor away from that system--
hence I'm working towards a database.

My question is this-- how can I total what I've entered from the database
based on the two codes? Example: I would like a cell to calculate all "CB
5421" totals. Right now I have the project and the account number in two
seperate columns.

I've used the following calculation:
=SUM(IF((Expenditures!$B2:$B10000="CB")*(Expenditu res!$C2:$C10000=5421),Expenditures!H2:H10000))

The problem with this is that Excel 97 isn't allowing me to just select an
entire column. Maybe I'm just being anal, but I'd like to have the formula
more like:
=SUM(IF((Expenditures!$B:$B="CB")*(Expenditures!$C :$C=5421),Expenditures!H:H))

Is there a better way to calculate this? or do I have something wrong with
it?

Audra
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default Adding based on Multiple Criteria?

Though you still have to specify the range, you can use:
=SUMPRODUCT(--(Expenditures!$B2:$B10000="CB"),--(Expenditures!$C2:$C10000=5421),Expenditures!H2:H1 0000)

If you wanted to include the entire column, you could specify the range by
rows:
=SUMPRODUCT(--(Expenditures!$B1:$B65536="CB"),--(Expenditures!$C1:$C65536=5421),Expenditures!H1:H6 5536)

HTH,
Paul

"Audra" wrote in message
...
I'm sure there's an easy solution to this, but I can't figure it out...
can
anyone assist?

I'm currently working on a budget for our company. We code things by
project (two letter code, example "CB") and each project has the same
account
numbers (ex: 5421).

We previously had each project's budget on individual worksheets, but it's
so inefficient and I'm trying to get my supervisor away from that system--
hence I'm working towards a database.

My question is this-- how can I total what I've entered from the database
based on the two codes? Example: I would like a cell to calculate all
"CB
5421" totals. Right now I have the project and the account number in two
seperate columns.

I've used the following calculation:
=SUM(IF((Expenditures!$B2:$B10000="CB")*(Expenditu res!$C2:$C10000=5421),Expenditures!H2:H10000))

The problem with this is that Excel 97 isn't allowing me to just select an
entire column. Maybe I'm just being anal, but I'd like to have the
formula
more like:
=SUM(IF((Expenditures!$B:$B="CB")*(Expenditures!$C :$C=5421),Expenditures!H:H))

Is there a better way to calculate this? or do I have something wrong
with
it?

Audra



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Adding based on Multiple Criteria?

Your second example won't work in XL97!

If you try it, you'll see that XL replaces B1:B65535 with B:B, and returns a
#NUM! error.

Just remove one of the rows:
B2:B65536 or B1:B65535

--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"PCLIVE" wrote in message
...
Though you still have to specify the range, you can use:
=SUMPRODUCT(--(Expenditures!$B2:$B10000="CB"),--(Expenditures!$C2:$C10000=5421),Expenditures!H2:H1 0000)

If you wanted to include the entire column, you could specify the range by
rows:
=SUMPRODUCT(--(Expenditures!$B1:$B65536="CB"),--(Expenditures!$C1:$C65536=5421),Expenditures!H1:H6 5536)

HTH,
Paul

"Audra" wrote in message
...
I'm sure there's an easy solution to this, but I can't figure it out...
can
anyone assist?

I'm currently working on a budget for our company. We code things by
project (two letter code, example "CB") and each project has the same
account
numbers (ex: 5421).

We previously had each project's budget on individual worksheets, but
it's
so inefficient and I'm trying to get my supervisor away from that
system--
hence I'm working towards a database.

My question is this-- how can I total what I've entered from the database
based on the two codes? Example: I would like a cell to calculate all
"CB
5421" totals. Right now I have the project and the account number in two
seperate columns.

I've used the following calculation:
=SUM(IF((Expenditures!$B2:$B10000="CB")*(Expenditu res!$C2:$C10000=5421),Expenditures!H2:H10000))

The problem with this is that Excel 97 isn't allowing me to just select
an
entire column. Maybe I'm just being anal, but I'd like to have the
formula
more like:
=SUM(IF((Expenditures!$B:$B="CB")*(Expenditures!$C :$C=5421),Expenditures!H:H))

Is there a better way to calculate this? or do I have something wrong
with
it?

Audra





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
adding multiple sums w/ different criteria Doug Excel Discussion (Misc queries) 6 January 19th 07 12:42 AM
sum based on multiple criteria Todd Excel Worksheet Functions 3 May 5th 06 10:06 PM
Adding up data in multiple cells for a single criteria. Philip Excel Worksheet Functions 1 April 5th 06 11:30 AM
Multiple Sum, based on criteria Andy the yeti Excel Worksheet Functions 4 December 22nd 05 02:32 PM
adding values based on criteria Brad Excel Worksheet Functions 1 July 20th 05 06:16 PM


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