+ Reply to Thread
Results 1 to 2 of 2

Vlookup, date range

  1. #1
    Registered User
    Join Date
    05-23-2012
    Location
    Chesapeake, VA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Vlookup, date range

    I have a list of claims with the date of the claim. I need to put the year and fiscal period that the claim occurred in the column next to the date. In order to do that, I need help coming up with a formula. For example, if a claim happened on 2/15/12, that is in our fiscal period 01, so I need to pull back 201201 (year 2012, period 01). Our fiscal periods do not match up with calendar months, however. so, I think I need to use an if/then statement, something to the effect of:
    IF the claim was between 1/29/12 and 2/25/12, THEN input 201201, but IF the claim was between 2/26/12 and 3/31/12, THEN input 201202, etc...

    Can anyone help me with a formula like this? Or is there another way to do it that I may be missing?

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,414

    Re: Vlookup, date range

    There are several ways you could do this, but you will need to list your fiscal periods in a small table, for example:

    1/29/12.......1
    2/26/12.......2
    4/1/12.........3

    and so on. Suppose this table occupies X1:Y12, and your first claim date occurs in cell C2, then you could use this formula:

    =YEAR(C2)&TEXT(VLOOKUP(C2,$X$1:$Y$12,2),"00")

    which could then be copied down to pick up other claim dates in column C.

    Hope this helps.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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