• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

sum values between two dates range in Excel

pencari

New Member
first, thx for this great forum..
i learn alot from here

i am strugrilling to sum values between to dates range in excel with this format( the item row is dynamic

Code:
Date    Item    IN    OUT    Sum            OUT  
8/1/2016                20.00            From    8/1/2016
    Books    5        20.00            To    8/9/2016
    Books    5        20.00            Total  
    Books    5        20.00              
8/2/2016                20.00            IN  
    Books        5    20.00            From    8/1/2016
    Books        5    20.00            To    8/9/2016
8/3/2016                20.00            Total  
    Books    5        20.00              
    Books    5        20.00              
    Books    5        20.00              
    Books    5        20.00              
8/4/2016                20.00

i can sum values between if i use this way

Code:
Date    Item    IN    OUT    Sum            OUT  
8/1/2016                20.00            From    8/1/2016
8/1/2016    Books    5        20.00            To    8/9/2016
8/1/2016    Books    5        20.00            Total    10
8/1/2016    Books    5        20.00              
8/2/2016                20.00            IN  
8/2/2016    Books        5    20.00            From    8/1/2016
8/2/2016    Books        5    20.00            To    8/9/2016
8/3/2016                20.00            Total    35
8/3/2016    Books    5        20.00              
8/3/2016    Books    5        20.00              
8/3/2016    Books    5        20.00              
8/3/2016    Books    5        20.00              
8/4/2016                20.00


can anybody help me with sum values between two date range with the number 1 example? i am thinking using offset but i dont get the way...

sorry for my bad english
 

Attachments

thx for the reply Nebu

its great idea and i dont think of it before

always learning new ..

thx Nebu for the help
 
Hello friends,

without helper column,

OUT=SUMPRODUCT(ISNUMBER(LOOKUP(ROW(C4:C16),ROW(C4:C16)/(C4:C16>=K4)*(C4:C16<=K5),C4:C16))*F4:F16)

IN=SUMPRODUCT(ISNUMBER(LOOKUP(ROW(C4:C16),ROW(C4:C16)/(C4:C16>=K9)*(C4:C16<=K10),C4:C16))*E4:E16)

David
 
Back
Top