Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 11
Default Calculation in Date Range

Dear Experts

Sheet1 has four columns from (column A : column D) and contains
following data

--date----weiht1----weight2------cash
01-06-07---500--------200--------50
01-06-07---300---------0--------150
02-06-07---200--------300--------50
02-06-07---100--------600---------0
02-06-07---800---------0---------50
03-06-07---600--------500--------30
03-06-07---400--------900--------50
04-06-07---400--------400--------20

I want to use following query between
Date range 02-06-07 to 03-06-07

a=sum(weight2)
b=count wight2=0
c=sum(cash)
d=count cash=0
e=total records

Following results are required
a=2300
b=1
c=180
d=1
e=5

Please help
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 299
Default Calculation in Date Range

=SUMPRODUCT(--(Date_Range=DATE(2007,06,02)),--(Date_Range<=DATE(2007,06,03)),Weight2_range)

to sum the weight, replace Weight2_range with Cash_range to sum the cash

How do you want to count the weight and the cash? Nor do I understand what
you mean by total records

I am assuming that you by 02-06-07 mean June 2nd 2007 and not January 1st
2007, if so change the month and day part in the DATE function



--


Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
(Remove ^^ from email)




"tqm1" wrote in message
...

Dear Experts

Sheet1 has four columns from (column A : column D) and contains
following data

--date----weiht1----weight2------cash
01-06-07---500--------200--------50
01-06-07---300---------0--------150
02-06-07---200--------300--------50
02-06-07---100--------600---------0
02-06-07---800---------0---------50
03-06-07---600--------500--------30
03-06-07---400--------900--------50
04-06-07---400--------400--------20

I want to use following query between
Date range 02-06-07 to 03-06-07

a=sum(weight2)
b=count wight2=0
c=sum(cash)
d=count cash=0
e=total records

Following results are required
a=2300
b=1
c=180
d=1
e=5

Please help




--
tqm1



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
Date Range Calculation KC Excel Discussion (Misc queries) 5 July 31st 06 11:11 PM
Validate date within range prior to calculation Natassja Excel Discussion (Misc queries) 1 January 24th 06 05:52 PM
Calculation based with Range of Date Rao Ratan Singh New Users to Excel 1 January 24th 06 09:05 AM
HELP - Date Range In 1 Cell Calculation Adam Excel Worksheet Functions 6 September 19th 05 08:24 PM
Date Range and calculation vgreen Excel Worksheet Functions 2 August 23rd 05 11:08 AM


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