+ Reply to Thread
Results 1 to 5 of 5

Lookup nearest billing cycle and count days

  1. #1
    Registered User
    Join Date
    05-31-2011
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    43

    Lookup nearest billing cycle and count days

    Hi;
    I'm really having difficulties to come out with one template whereby to lookup what is the nearest billing cycle and count how many days from the previous month of previous month of same billing cycle date.

    > Need to return what is the nearest billing cycle date of range of dates given
    > Example: If product purchased on cell A1 : 3rd March 2012, cell B1 should return nearest billing cycle 7th March 2012
    > Example on no of days in the month of BC range

    1.****** Purchased on 1st March 2012, the nearest BC is 7th Mar 2012, the proration calculation is based on 7th Feb to 6th Mar, therefore is no. of days is 29.
    2.****** Purchased on 24th Mar, the nearest BC is 25th Mar 2012, the proration calculation is based on 25th Feb to 24th Mar, therefore the no. of days is 29
    3.****** Purchased on 26th Mar, the nearest BC is 7th Apr 2012, the proration calculation is based on 7th Mar to 6th April, therefore the no. of days is 31.


    Attached is the excel file how it should work. Hope that someone can help me with it.
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,504

    Re: Lookup nearest billing cycle and count days

    Try in attachment.
    C column is array formula, must be confirmed by Ctrl-Shift-Enter
    Attached Files Attached Files
    Quang PT

  3. #3
    Forum Contributor
    Join Date
    08-14-2006
    Location
    USA
    MS-Off Ver
    2019
    Posts
    686

    Re: Lookup nearest billing cycle and count days

    here's another option.
    doesn't use an array and your cycle end dates must be sorted descending

    Xl0000068.xls

  4. #4
    Registered User
    Join Date
    05-31-2011
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: Lookup nearest billing cycle and count days

    you guys are awesome...i wish i could learn excel from you all..thank you very much...looking forward to learn more from you all..

  5. #5
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,242

    Re: Lookup nearest billing cycle and count days

    Other possibility,

    C3,

    =EOMONTH(B3,(DAY(B3)>25)-1)+LOOKUP(DAY(B3),{1,7;8,10;11,13;14,16;17,19;20,22;23,25;26,7})

    D3,

    =C3-EDATE(C3,-1)

    copy down.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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