LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 553
Default Sumproduct based which also weights data based on date

I have a data in the range A7:D10. I am trying to perform a conditional sum
in cell B2 based on Region. I know I can do a conditional sum by using:

=SUMPRODUCT(--(A7:A10=A2),B7:B10) or
=SUMPRODUCT({1;0;0;1},{10;11;12;13})

But I also want the data to be weighted based on the number of days relative
to the dates in B1:BE. So if I could do what I wanted the the values in B2
will be:

=SUMPRODUCT({1;0;0;1},{10;11;12;13},{58%, 100%,100%,67%})

Note that the percentages are calculated by takeing the the date in B1 and
subtracting it by the dates in C7:10. I want it to be able to say:
If < than 365 then Days/365, If 365 then 1 Otherwise 0. This will allow
me to apply a weighted variable to my conditional sum.

Any ideas how to do this. Do I have to incorporate a sumproduct and an
array (CNTL-ALT-ENTER) formula?

Thanks

EM


A B C D
1 12/31/2006 12/31/2007 12/31/2008
2 Region 1 ?
3 Region 2
4
5
6 Amount Start Date
7 Region 1 10 6/3/2006
8 Region 2 11 12/31/2007
9 Region 2 12 7/31/2008
10Region 1 13 12/31/2008

 
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 data in one cell, then date in adjacent cell Jane Excel Worksheet Functions 8 December 22nd 07 03:34 AM
report date - date rec.ved=days late, but how to rid dates complet MS Questionnairess Excel Worksheet Functions 3 January 25th 07 06:17 PM
Manual control of link updating for downloaded quotes? dk_ Excel Discussion (Misc queries) 9 November 15th 06 01:04 PM
ranking query JaimeTimbrell Excel Discussion (Misc queries) 2 February 16th 06 08:09 AM
Inserting a new line when external data changes Rental Man Excel Discussion (Misc queries) 0 January 11th 06 07:05 PM


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