+ Reply to Thread
Results 1 to 17 of 17

Sum between date but date Vertical and Month Name Horizontal

  1. #1
    Registered User
    Join Date
    01-24-2014
    Location
    Ahmedabad
    MS-Off Ver
    Excel 2007
    Posts
    7

    Exclamation Sum between date but date Vertical and Month Name Horizontal

    Hello,

    Please find attachment

    i need sum between two date but my data structure different , please review my attachment and provide me help.

    Amit Bhatt Sample File.xlsx

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Sum between date but date Vertical and Month Name Horizontal

    Hi and welcome to the forum

    1st, change the "dates" in row 1 to actual dates - 1/1/13, 2/1/13 etc - it always makes things easier if you keep data formats consitant

    Then, based on your data, use this...
    =SUMPRODUCT(($B$2:$Y$32)*($B$1:$Y$1>=$AC$3)*($B$1:$Y$1<=AC4))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Sum between date but date Vertical and Month Name Horizontal

    Hi,

    Try this formula with your current formatting:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    where the following are named ranges:
    - Day: $A$2:$A$32
    - MonthYear: $B$1:$Y$1
    - StartDate: $AC$3
    - EndDate: $AC$4

    Hope this helps

  4. #4
    Registered User
    Join Date
    01-24-2014
    Location
    Ahmedabad
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Sum between date but date Vertical and Month Name Horizontal

    Hello,

    thanks for your reply but date not fix dear, for actual date you need to check column and row both.

    Row has only days not complete date , to make complete date you need to consider Column also .

    Row & Column = " 1 " & "Jan -2013" after that complete date come out = 01 - Jan - 2013.

    thanks for your solution but its not work for me .

    Regard,
    Amit Bhatt

  5. #5
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Sum between date but date Vertical and Month Name Horizontal

    Try my solution Amit, this will fix your issue, and checks both row and column for complete date.

    Without named ranges, the formula is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Sum between date but date Vertical and Month Name Horizontal

    ajryan, nice formula My main point is that when building workbooks, it always makes things simpler if data/heading formats can be kept consitsant

    Your formula, without the range names would be....
    =SUMPRODUCT(($B$2:$Y$32)*(DATE(YEAR($B$1:$Y$1),MONTH($B$1:$Y$1),$A$2:$A$32)>=$AC$3)*(DATE(YEAR($B$1:$Y$1),MONTH($B$1:$Y$1),$A$2:$A$32)<=$AC$4))
    If the headings matched the date ranges, then that would shorten to...
    =SUMPRODUCT(($B$2:$Y$32)*($B$1:$Y$1>=$AC$3)*($B$1:$Y$1<=AC4))

    edit: Sorry, I didnt get that column A was days
    Last edited by FDibbins; 01-24-2014 at 06:37 PM.

  7. #7
    Registered User
    Join Date
    01-24-2014
    Location
    Ahmedabad
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Sum between date but date Vertical and Month Name Horizontal

    Hello,

    I have already formula for this but i want some short one.

    on your both formulas its not working not getting any result value.

    please look at below formula its working fine but i want short code for this one.

    {=IF((TEXT(AA9,"MMM-YY"))<>(TEXT(AB9,"MMM-YY")),SUM(IF($B$2:$Y$2<=DATE(YEAR(AB9),MONTH(AB9),1)-1-$B$3+1,IF($B$2:$Y$2>AA9-$B$3,IF($B$2:$Y$2>DATE(YEAR(AA9),MONTH(AA9)+1,1)-1-$B$3+1,$B$4:$Y$34))))+SUM(IF($B$2:$Y$2=EOMONTH(AB9,0)-$B$3+1,IF($A$4:$A$34<=DAY(AB9),$B$4:$Y$34)))+SUM(IF($B$2:$Y$2=DATE(YEAR(AA9),MONTH(AA9)+1,1)-1-$B$3+1,IF($A$4:$A$34>=DAY(AA9),$B$4:$Y$34))),SUM(IF($B$2:$Y$2=DATE(YEAR(AA9),MONTH(AA9)+1,1)-1-$B$3+1,IF($A$4:$A$34>=DAY(AA9),$B$4:$Y$34))))}

  8. #8
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Sum between date but date Vertical and Month Name Horizontal

    Thanks, and I get your point Ford

    Never mind, it took me 10 minutes of trying to make a formula before I realised the same thing

  9. #9
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Sum between date but date Vertical and Month Name Horizontal

    Works fine for me...
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    01-24-2014
    Location
    Ahmedabad
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Sum between date but date Vertical and Month Name Horizontal

    Quote Originally Posted by ajryan88 View Post
    Works fine for me...
    there is no formula in your attachment can you check for me.

  11. #11
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Sum between date but date Vertical and Month Name Horizontal

    Whoops, try this one... Sample File (1).xlsx

  12. #12
    Registered User
    Join Date
    01-24-2014
    Location
    Ahmedabad
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Sum between date but date Vertical and Month Name Horizontal

    Whoops, try this one... Attachment 292469[/QUOTE]

    No result ,, check attachment please

    Excel.png[QUOTE=ajryan88;3558906]

    you can contact me on my skype >> Amit.bti

  13. #13
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Sum between date but date Vertical and Month Name Horizontal

    I don't know what is happening, but this is directly from your attachment: Capture.PNG

    EDIT: And no, I won't be contacting you on Skype, they made a forum for helping people with Excel, and I plan on continuing to use it

  14. #14
    Registered User
    Join Date
    01-24-2014
    Location
    Ahmedabad
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Sum between date but date Vertical and Month Name Horizontal

    Quote Originally Posted by ajryan88 View Post
    I don't know what is happening, but this is directly from your attachment: Attachment 292473

    EDIT: And no, I won't be contacting you on Skype, they made a forum for helping people with Excel, and I plan on continuing to use it
    Ok, no issue but as per your capture image cursor not on result BOX , and whatever i see on Formula bar that belong to other box.


    Capturexx.png

  15. #15
    Registered User
    Join Date
    01-24-2014
    Location
    Ahmedabad
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Sum between date but date Vertical and Month Name Horizontal

    thanks now i find simple solution based on your formula thanks a lot and its work for me perfectly.


    so many thanks to you..

  16. #16
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Sum between date but date Vertical and Month Name Horizontal

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  17. #17
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Sum between date but date Vertical and Month Name Horizontal

    No worries. Please don't forget to mark this thread as solved and please click on the * next to my post to say thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Sort month/date/year data using month and date only
    By SMW820 in forum Excel General
    Replies: 8
    Last Post: 11-18-2014, 08:39 AM
  2. calculating month to date, year to date, week to date
    By labogola in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-06-2014, 05:21 AM
  3. Array function for date(month), Range Date(month)
    By dluhut in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-19-2013, 05:14 PM
  4. Convert horizontal date into Vertical date
    By ramr_sw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-29-2009, 02:18 PM
  5. Date arithmetic: adding 1 month to prior end of month date
    By manxman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-14-2006, 04:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1