Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nan Nan is offline
external usenet poster
 
Posts: 23
Default SUMIF to calculate units sold in a specified timeframe

I could use your help to sum a range if a condition is met. I'm trying to
calculate the number of units sold in the last 6 months and the last 8 weeks.

Here's my worksheet layout:

C1: =now()

A10:C22 as follows
Col A Col B Col C
Jan-2007 2007 2
Feb-2007 2007 -1
Mar-2007 2007 0
Apr-2007 2007 0
May-2007 2007 0
Jun-2007 2007 0
Jul-2007 2007 0
Aug-2007 2007 0
Sep-2007 2007 0
Oct-2007 2007 1
Nov-2007 2007 0
Dec-2007 2007 0
Jan-2008 2008 0

B38: =DATE(YEAR($C$1),MONTH($C$1)-6,DAY(1)) -- 6 months from today
B39: =DATE(YEAR($C$1),MONTH($C$1)-2,DAY(1)) -- 2 months from today

I'm stuck trying to evaluate the condition, then summing only those units
sold in Col C within the specified time frame.

--
TIA, Nan
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default SUMIF to calculate units sold in a specified timeframe

=SUMIF(A:A,"="&BE38,C:C)

and

=SUMIF(A:A,"="&BE39,C:C)

--
---
HTH

Bob


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



"Nan" wrote in message
...
I could use your help to sum a range if a condition is met. I'm trying to
calculate the number of units sold in the last 6 months and the last 8
weeks.

Here's my worksheet layout:

C1: =now()

A10:C22 as follows
Col A Col B Col C
Jan-2007 2007 2
Feb-2007 2007 -1
Mar-2007 2007 0
Apr-2007 2007 0
May-2007 2007 0
Jun-2007 2007 0
Jul-2007 2007 0
Aug-2007 2007 0
Sep-2007 2007 0
Oct-2007 2007 1
Nov-2007 2007 0
Dec-2007 2007 0
Jan-2008 2008 0

B38: =DATE(YEAR($C$1),MONTH($C$1)-6,DAY(1)) -- 6 months from today
B39: =DATE(YEAR($C$1),MONTH($C$1)-2,DAY(1)) -- 2 months from today

I'm stuck trying to evaluate the condition, then summing only those units
sold in Col C within the specified time frame.

--
TIA, Nan



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nan Nan is offline
external usenet poster
 
Posts: 23
Default SUMIF to calculate units sold in a specified timeframe

Gosh, such an easy solution! Thank you so much!

I'll be posting another question soon regarding using SUMIF with an "OR"
condition, i.e. sum the range if col A contains "apple" or col A contains
"orange".
--
TIA, Nan


"Bob Phillips" wrote:

=SUMIF(A:A,"="&BE38,C:C)

and

=SUMIF(A:A,"="&BE39,C:C)

--
---
HTH

Bob


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



"Nan" wrote in message
...
I could use your help to sum a range if a condition is met. I'm trying to
calculate the number of units sold in the last 6 months and the last 8
weeks.

Here's my worksheet layout:

C1: =now()

A10:C22 as follows
Col A Col B Col C
Jan-2007 2007 2
Feb-2007 2007 -1
Mar-2007 2007 0
Apr-2007 2007 0
May-2007 2007 0
Jun-2007 2007 0
Jul-2007 2007 0
Aug-2007 2007 0
Sep-2007 2007 0
Oct-2007 2007 1
Nov-2007 2007 0
Dec-2007 2007 0
Jan-2008 2008 0

B38: =DATE(YEAR($C$1),MONTH($C$1)-6,DAY(1)) -- 6 months from today
B39: =DATE(YEAR($C$1),MONTH($C$1)-2,DAY(1)) -- 2 months from today

I'm stuck trying to evaluate the condition, then summing only those units
sold in Col C within the specified time frame.

--
TIA, Nan




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default SUMIF to calculate units sold in a specified timeframe

That is done with

=SUMPRODUCT(--(ISNUMBER(MATCH(A1:A20,{"apple","orange"},0))))

--
---
HTH

Bob


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



"Nan" wrote in message
...
Gosh, such an easy solution! Thank you so much!

I'll be posting another question soon regarding using SUMIF with an "OR"
condition, i.e. sum the range if col A contains "apple" or col A contains
"orange".
--
TIA, Nan


"Bob Phillips" wrote:

=SUMIF(A:A,"="&BE38,C:C)

and

=SUMIF(A:A,"="&BE39,C:C)

--
---
HTH

Bob


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



"Nan" wrote in message
...
I could use your help to sum a range if a condition is met. I'm trying
to
calculate the number of units sold in the last 6 months and the last 8
weeks.

Here's my worksheet layout:

C1: =now()

A10:C22 as follows
Col A Col B Col C
Jan-2007 2007 2
Feb-2007 2007 -1
Mar-2007 2007 0
Apr-2007 2007 0
May-2007 2007 0
Jun-2007 2007 0
Jul-2007 2007 0
Aug-2007 2007 0
Sep-2007 2007 0
Oct-2007 2007 1
Nov-2007 2007 0
Dec-2007 2007 0
Jan-2008 2008 0

B38: =DATE(YEAR($C$1),MONTH($C$1)-6,DAY(1)) -- 6 months from today
B39: =DATE(YEAR($C$1),MONTH($C$1)-2,DAY(1)) -- 2 months from today

I'm stuck trying to evaluate the condition, then summing only those
units
sold in Col C within the specified time frame.

--
TIA, Nan






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nan Nan is offline
external usenet poster
 
Posts: 23
Default SUMIF to calculate units sold in a specified timeframe

Thanks, Bob. I really appreciate your time. SUMPRODUCT is new to me. I
tried your solution with my worksheet, but I realize I wasn't clear on the
setup. I don't understand where SUMPRODUCT actually is told what range to
calculate. But, before you spend any more time on this, I did post another
question which was answered by Marcelo. I used his suggested SUMIF answer:

=SUMIF(a1:a10,"oranges",b1:b10)+SUMIF(a1:a10,"Appl es",b1:b10)


ColA ColB
apples 1
carrots 2
apples 5
oranges 1
celery 2
apples 1
onions 2
apples 5
oranges 1
celery 2

--
TIA, Nan


"Bob Phillips" wrote:

That is done with

=SUMPRODUCT(--(ISNUMBER(MATCH(A1:A20,{"apple","orange"},0))))

--
---
HTH

Bob


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



"Nan" wrote in message
...
Gosh, such an easy solution! Thank you so much!

I'll be posting another question soon regarding using SUMIF with an "OR"
condition, i.e. sum the range if col A contains "apple" or col A contains
"orange".
--
TIA, Nan


"Bob Phillips" wrote:

=SUMIF(A:A,"="&BE38,C:C)

and

=SUMIF(A:A,"="&BE39,C:C)

--
---
HTH

Bob


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



"Nan" wrote in message
...
I could use your help to sum a range if a condition is met. I'm trying
to
calculate the number of units sold in the last 6 months and the last 8
weeks.

Here's my worksheet layout:

C1: =now()

A10:C22 as follows
Col A Col B Col C
Jan-2007 2007 2
Feb-2007 2007 -1
Mar-2007 2007 0
Apr-2007 2007 0
May-2007 2007 0
Jun-2007 2007 0
Jul-2007 2007 0
Aug-2007 2007 0
Sep-2007 2007 0
Oct-2007 2007 1
Nov-2007 2007 0
Dec-2007 2007 0
Jan-2008 2008 0

B38: =DATE(YEAR($C$1),MONTH($C$1)-6,DAY(1)) -- 6 months from today
B39: =DATE(YEAR($C$1),MONTH($C$1)-2,DAY(1)) -- 2 months from today

I'm stuck trying to evaluate the condition, then summing only those
units
sold in Col C within the specified time frame.

--
TIA, Nan








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default SUMIF to calculate units sold in a specified timeframe

I failed to give you a sum, I gave you a count.

Sum would be

=SUMPRODUCT(--(ISNUMBER(MATCH(A1:A10,{"apple","orange"},0))),B1: B10)

Marcelo's is probably better in this particular instance, but mine is more
flexible, so put it in your toolbox.

Also see http://www.xldynamic.com/source/xld.SUMPRODUCT.html for a detailed
explanation.


--
---
HTH

Bob


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



"Nan" wrote in message
...
Thanks, Bob. I really appreciate your time. SUMPRODUCT is new to me. I
tried your solution with my worksheet, but I realize I wasn't clear on the
setup. I don't understand where SUMPRODUCT actually is told what range to
calculate. But, before you spend any more time on this, I did post
another
question which was answered by Marcelo. I used his suggested SUMIF
answer:

=SUMIF(a1:a10,"oranges",b1:b10)+SUMIF(a1:a10,"Appl es",b1:b10)


ColA ColB
apples 1
carrots 2
apples 5
oranges 1
celery 2
apples 1
onions 2
apples 5
oranges 1
celery 2

--
TIA, Nan


"Bob Phillips" wrote:

That is done with

=SUMPRODUCT(--(ISNUMBER(MATCH(A1:A20,{"apple","orange"},0))))

--
---
HTH

Bob


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



"Nan" wrote in message
...
Gosh, such an easy solution! Thank you so much!

I'll be posting another question soon regarding using SUMIF with an
"OR"
condition, i.e. sum the range if col A contains "apple" or col A
contains
"orange".
--
TIA, Nan


"Bob Phillips" wrote:

=SUMIF(A:A,"="&BE38,C:C)

and

=SUMIF(A:A,"="&BE39,C:C)

--
---
HTH

Bob


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



"Nan" wrote in message
...
I could use your help to sum a range if a condition is met. I'm
trying
to
calculate the number of units sold in the last 6 months and the last
8
weeks.

Here's my worksheet layout:

C1: =now()

A10:C22 as follows
Col A Col B Col C
Jan-2007 2007 2
Feb-2007 2007 -1
Mar-2007 2007 0
Apr-2007 2007 0
May-2007 2007 0
Jun-2007 2007 0
Jul-2007 2007 0
Aug-2007 2007 0
Sep-2007 2007 0
Oct-2007 2007 1
Nov-2007 2007 0
Dec-2007 2007 0
Jan-2008 2008 0

B38: =DATE(YEAR($C$1),MONTH($C$1)-6,DAY(1)) -- 6 months from today
B39: =DATE(YEAR($C$1),MONTH($C$1)-2,DAY(1)) -- 2 months from today

I'm stuck trying to evaluate the condition, then summing only those
units
sold in Col C within the specified time frame.

--
TIA, Nan








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
formula to track timeframe by automatically highlighting cells maijiuli Excel Worksheet Functions 6 July 16th 07 09:16 PM
counting dates within a timeframe DDR1974 Setting up and Configuration of Excel 0 June 27th 07 07:54 PM
Numeric Rank By Qty Sold JeremyH1982 Excel Discussion (Misc queries) 3 February 22nd 07 07:45 PM
keep track of gift certificates sold ACharlene New Users to Excel 1 September 13th 05 11:48 PM
Secondary Axis Annual Units sold on 1 Y Axis - Dollar Volume on another John Smith Charts and Charting in Excel 7 December 21st 04 08:26 PM


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