Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
B Akers
 
Posts: n/a
Default Creating a formula that will SUM with 2 Variables

I have been trying to figure out how to create a formula in Excel 2003 that
will sum only if 2 variables are met. An example would be if you had 5000
rows of data. Columns are NAME, AGE, CITY. Let's say I wanted to sum how
many people are in Seattle and are 25 can Excel do this?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default Creating a formula that will SUM with 2 Variables

One way ..

Assuming City in col C, Age in col B
data from row2 to 5000

we could put in say E1:
=SUMPRODUCT(($C$2:$C$5000="Seattle")*($B$2:$B$5000 =25))

Alternatively,
we could point to cells instead of hardcoding
so if we input in D1: Seattle, in D2: 25,
then in E1:
=SUMPRODUCT(($C$2:$C$5000=D1)*($B$2:$B$5000=D2))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"B Akers" <B wrote in message
...
I have been trying to figure out how to create a formula in Excel 2003

that
will sum only if 2 variables are met. An example would be if you had 5000
rows of data. Columns are NAME, AGE, CITY. Let's say I wanted to sum how
many people are in Seattle and are 25 can Excel do this?



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
Creating a formula for down and distance Cecil Excel Worksheet Functions 3 August 29th 05 04:03 AM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
Creating a specific formula booroni New Users to Excel 3 March 26th 05 10:05 AM
How do you display the values of variables within an Excel formula curious one Excel Discussion (Misc queries) 1 March 3rd 05 02:52 PM


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