Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default IF Function Question

I have two columns: A is Date (format 1-Jan, 14-Feb, 6-Mar, etc.) and B is
Amount ($). I want to search column A and if it contains Jan, I want to sum
the amounts in Column B. How do I accomplish this?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default IF Function Question

On Sun, 1 Mar 2009 18:27:01 -0800, MiJa wrote:

I have two columns: A is Date (format 1-Jan, 14-Feb, 6-Mar, etc.) and B is
Amount ($). I want to search column A and if it contains Jan, I want to sum
the amounts in Column B. How do I accomplish this?


Do you want to sum ALL January dates, or only those for a specified year?

For just the January's of 2009, something like:

=sumif(a:a,"="&date(2009,1,1),b:b) - sumif(a:a,""&date(2009,1,31),b:b)

--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 857
Default IF Function Question

Hi,

Try:

=SUMPRODUCT(--(A2:A18=D1),--(A2:A18<=E1),B2:B18)

Where D1 contains 1/1/2009 and E1 contains 1/31/2009

In 2007 you can also use:

=SUMIFS(B2:B18,A2:A18,"="&D1,A2:A18,"<="&E1)

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"MiJa" wrote:

I have two columns: A is Date (format 1-Jan, 14-Feb, 6-Mar, etc.) and B is
Amount ($). I want to search column A and if it contains Jan, I want to sum
the amounts in Column B. How do I accomplish this?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default IF Function Question

I tried to create a hybrid of the 2 answers to my question because I do not
want to have additional cells for "1/1/2009" and "1/31/2009;" I need to do
this for each month so I want to incorporate it into the equation. My
equation is
=SUMPRODUCT(--(O19:O999=DATE(2009,1,1)),--(O19:O999<=DATE(2009,1,31)),Q19:Q999) but it just returns 0.00. Any suggestions?

To expand on my question, if I have 4 Jan dates in Column A I want to sum
the 4 corresponding amounts in Column B. The answer from Ron summed the whole
column B.

"Shane Devenshire" wrote:

Hi,

Try:

=SUMPRODUCT(--(A2:A18=D1),--(A2:A18<=E1),B2:B18)

Where D1 contains 1/1/2009 and E1 contains 1/31/2009

In 2007 you can also use:

=SUMIFS(B2:B18,A2:A18,"="&D1,A2:A18,"<="&E1)

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"MiJa" wrote:

I have two columns: A is Date (format 1-Jan, 14-Feb, 6-Mar, etc.) and B is
Amount ($). I want to search column A and if it contains Jan, I want to sum
the amounts in Column B. How do I accomplish this?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default IF Function Question

On Mon, 2 Mar 2009 07:53:04 -0800, MiJa wrote:

I tried to create a hybrid of the 2 answers to my question because I do not
want to have additional cells for "1/1/2009" and "1/31/2009;" I need to do
this for each month so I want to incorporate it into the equation. My
equation is
=SUMPRODUCT(--(O19:O999=DATE(2009,1,1)),--(O19:O999<=DATE(2009,1,31)),Q19:Q999) but it just returns 0.00. Any suggestions?


If your data is in columns A & B, you didn't change the references.


To expand on my question, if I have 4 Jan dates in Column A I want to sum
the 4 corresponding amounts in Column B. The answer from Ron summed the whole
column B.


If my answer

=SUMIF(A:A,"="&DATE(2009,1,1),B:B) - SUMIF(A:A,""&DATE(2009,1,31),B:B)

summed the entire column B, and not just the January entries, then either you
did not enter it correctly, or there is something about your data that you have
not told us.

--ron
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
IF Function Question [email protected] Excel Worksheet Functions 1 January 23rd 08 05:31 PM
IF Function Question blucajun Excel Worksheet Functions 6 August 3rd 07 06:35 PM
Function Question JustOneJawa Excel Worksheet Functions 2 June 8th 06 08:43 PM
Function Question Rubix Excel Worksheet Functions 5 February 7th 06 01:55 AM
Question on "Value" function Renny Bosch Excel Discussion (Misc queries) 6 December 31st 04 02:07 AM


All times are GMT +1. The time now is 12:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"