+ Reply to Thread
Results 1 to 11 of 11

Date help

  1. #1
    Registered User
    Join Date
    11-20-2011
    Location
    ireland
    MS-Off Ver
    Excel 2010
    Posts
    53

    Date help

    HI*

    I have attached a workbook with 2 sheets, the formulas are in sheet 2 that I am using (E4), currently I have it doing a sumifs based on a specific number,specfic word (in Cell A1) and if a date falls between two dates in cell E2&E3)

    In one sense it is working but you can see it totals April to 32. I want it to only count until the end of the month and then carry it over to the next month.

    I have put an example of what I mean in yellow on sheet 2*

    Any help would be appreciated*
    Attached Files Attached Files

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Date help

    May be

    E4
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Registered User
    Join Date
    11-20-2011
    Location
    ireland
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Date help

    Hi Shukla

    That seems to be someway towards working, in reality there will be multiple rows on sheet one for the same number, when I add more rows it doesn't seem to add them up?

    Thanks

  4. #4
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Date help

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Registered User
    Join Date
    11-20-2011
    Location
    ireland
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Date help

    I have attached the document with more data.

    The formula you had worked on the one row, sheet 1 now has a lot more date and as well as splitting it out into the relevant months I need it to add all instances also.

    Thanks so much for your help
    Attached Files Attached Files

  6. #6
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Date help

    What would be expected result??

  7. #7
    Registered User
    Join Date
    11-20-2011
    Location
    ireland
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Date help

    To look up each cost centre 1,2 & 3 on sheet 1 and it gives a total of days in April ,may , June etc..

    And as with you first formula it splits the total days into month

    E.g. it might say 40 days from 20/06/2017 Which needs to show as 10 days in June and 30 days in July

    Does that make sense?

  8. #8
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Date help

    May be try

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    If this is not what you looking for please update some expected result with conditions

  9. #9
    Registered User
    Join Date
    11-20-2011
    Location
    ireland
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Date help

    Hi I have put the formula in to sheet2 E4 - E6 then across, I am getting numbers but not ones that math the amount

    In yellow on sheet 2 for store 1 I have put a expected outcome

    April total = 4 days
    May Total = 7 Days
    June Total = 65Days this is where you can see on sheet 1 in yellow there are 2 carry over dates as the amount of days exceeds the amount in the month
    July Total = 12 Days

    Hope that helps?
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    11-20-2011
    Location
    ireland
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Date help

    It looks like instead of treating each row as individual on sheet one it is taking the lowest from date and the highest to date within the month and returning the days based on that

  11. #11
    Registered User
    Join Date
    11-20-2011
    Location
    ireland
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Date help

    So I seem to have two formulas that sort of do what I want but I just need to combine them,

    Formula 1
    This formula returns a value based on all the correct criteria but does not split the overlapping dates into the correct months

    =SUMIFS('Sheet 1'!$G$3:$G$58,'Sheet 1'!$B$3:$B$58,$C5,'Sheet 1'!$F$3:$F$58,$A$1,'Sheet 1'!$H$3:$H$58,">="&Q$2,'Sheet 1'!$H$3:$H$58,"<="&Q$3)

    Formula 2
    This formula returns the correct days per month but is only working on 1 row rather than combining all the rows that fall under the sumifs criteria

    =MAX(0,MIN(EOMONTH(Q2,0),$I3)-MAX(Q2,$H3)+1)

+ 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. [SOLVED] Change Date with Date Picker If Date Less Than 7 Days From Another Date
    By Macfool in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-16-2016, 09:10 AM
  2. Week to date, Month to date, Qtr to date and Year to date
    By Neilesh Kumar in forum Excel General
    Replies: 4
    Last Post: 06-10-2016, 08:53 AM
  3. [SOLVED] Formula to compare date (including month and year) from a listed date to today's date
    By mhewitson15 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-11-2014, 05:31 PM
  4. Counting if data falls on date between Start Date, End Date or Possible End Date
    By JessHasQuestions in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 07-26-2014, 08:01 AM
  5. Replies: 1
    Last Post: 10-02-2012, 02:42 PM
  6. Replies: 1
    Last Post: 09-28-2012, 08:52 AM
  7. Replies: 7
    Last Post: 11-16-2008, 05:48 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