Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sum the items in a column whish match a certain value


Hello,

I am looking for a solution to this please...

I have 3 columns: Name, Wage, Date

Let's say John Smith has appeared in the name column 10 times but of
those 10, only 3 have been dated in March and on each of the 3 march
dates he has been paid $15, $10 and $20 respectively.

I would like a formula which would say "If John Smith is in column A
AND the date in column C is in March then show the sum total of column
B meeting all the criteria.

So the result of the formula would be $45.00.

I have tried SUMPRODUCT formulas but they didn't work for me and I
tried SUM(IF and that worked but there isn't an IF formula in Visual
basic which is where i'd like to stick this formula.

Any help would be greatly appreciated.

Thanks very much

John C


--
johncassell
------------------------------------------------------------------------
johncassell's Profile: http://www.excelforum.com/member.php...o&userid=25016
View this thread: http://www.excelforum.com/showthread...hreadid=534192

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Sum the items in a column whish match a certain value

There are really only two easy options. One is the sumproduct formula (which
I promise you will work) and the other is a pivot table (depending what you
want to do this is a fast effective way of producing results).

=SUMPRODUCT(--(A2:A16="John"), --(MONTH(C2:C16)=3), --(B2:B16))

If you want help with a pivot table just ask...
--
HTH...

Jim Thomlinson


"johncassell" wrote:


Hello,

I am looking for a solution to this please...

I have 3 columns: Name, Wage, Date

Let's say John Smith has appeared in the name column 10 times but of
those 10, only 3 have been dated in March and on each of the 3 march
dates he has been paid $15, $10 and $20 respectively.

I would like a formula which would say "If John Smith is in column A
AND the date in column C is in March then show the sum total of column
B meeting all the criteria.

So the result of the formula would be $45.00.

I have tried SUMPRODUCT formulas but they didn't work for me and I
tried SUM(IF and that worked but there isn't an IF formula in Visual
basic which is where i'd like to stick this formula.

Any help would be greatly appreciated.

Thanks very much

John C


--
johncassell
------------------------------------------------------------------------
johncassell's Profile: http://www.excelforum.com/member.php...o&userid=25016
View this thread: http://www.excelforum.com/showthread...hreadid=534192


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Sum the items in a column whish match a certain value

Sorry I meant to include this link. Everything you wanted to know about
sumproduct...

http://www.xldynamic.com/source/xld.SUMPRODUCT.html
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

There are really only two easy options. One is the sumproduct formula (which
I promise you will work) and the other is a pivot table (depending what you
want to do this is a fast effective way of producing results).

=SUMPRODUCT(--(A2:A16="John"), --(MONTH(C2:C16)=3), --(B2:B16))

If you want help with a pivot table just ask...
--
HTH...

Jim Thomlinson


"johncassell" wrote:


Hello,

I am looking for a solution to this please...

I have 3 columns: Name, Wage, Date

Let's say John Smith has appeared in the name column 10 times but of
those 10, only 3 have been dated in March and on each of the 3 march
dates he has been paid $15, $10 and $20 respectively.

I would like a formula which would say "If John Smith is in column A
AND the date in column C is in March then show the sum total of column
B meeting all the criteria.

So the result of the formula would be $45.00.

I have tried SUMPRODUCT formulas but they didn't work for me and I
tried SUM(IF and that worked but there isn't an IF formula in Visual
basic which is where i'd like to stick this formula.

Any help would be greatly appreciated.

Thanks very much

John C


--
johncassell
------------------------------------------------------------------------
johncassell's Profile: http://www.excelforum.com/member.php...o&userid=25016
View this thread: http://www.excelforum.com/showthread...hreadid=534192


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sum the items in a column whish match a certain value


Thanks very much for that Jim, exactly what I was looking for..

Thanks again

Joh

--
johncassel
-----------------------------------------------------------------------
johncassell's Profile: http://www.excelforum.com/member.php...fo&userid=2501
View this thread: http://www.excelforum.com/showthread.php?threadid=53419

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
line up items in column a with items in columns b, c, etc meera123 Excel Discussion (Misc queries) 0 September 2nd 08 02:20 PM
SUMPRODUCT to count items with duplicates where another column contains two defined items PCLIVE Excel Worksheet Functions 4 September 8th 07 10:33 AM
match two items to table for result Annette Excel Worksheet Functions 2 January 16th 07 03:40 AM
Lookup match 2 items HFC-SC New Users to Excel 4 August 17th 06 07:58 AM
Sort and Match like Items in 2 Columns blaylock Excel Worksheet Functions 2 July 26th 06 09:32 PM


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