+ Reply to Thread
Results 1 to 6 of 6

Lookup Date Value based on 3 Values

  1. #1
    Registered User
    Join Date
    10-20-2008
    Location
    chico
    Posts
    11

    Lookup Date Value based on 3 Values

    I have data that contains all the days in a year G7:I372. I want to lookup a value based on month, date and return the result. The sheet I am using contains a list in A3. As I change the value of A3, i want the dates to update. See attached sheet.
    Attached Files Attached Files
    Last edited by faucetguru; 03-12-2009 at 04:57 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Lookup Date Value based on 3 Values

    You're going a long way for something as simple "create a listing of all valid dates in a month". You don't really need that chart in G H and I. All you need is a simple conversion chart (I added it in columns L M) to reference your "text" months as numbers.

    In the attached, both columns A and B operate off of the reference in A3 only and the small chart. The months will end where they need to, even on leap years. Be careful with the dates 29,30 and 31, those formulas are slightly different.

    You can do away with all that extra stuff..unless it serves some purpose you've not explained.

    In truth, you don't really need the A column either...
    Attached Files Attached Files
    Last edited by JBeaucaire; 03-12-2009 at 03:02 AM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Lookup Date Value based on 3 Values

    JB, you could extend further and dispense with lookup table altogether using DATEVALUE, eg:

    B8: =DATEVALUE("1"&$A$3)

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Lookup Date Value based on 3 Values

    That's a great trick! Nice.

  5. #5
    Registered User
    Join Date
    10-20-2008
    Location
    chico
    Posts
    11

    Re: Lookup Date Value based on 3 Values

    B8: =DATEVALUE("1"&$A$3) was a great solution.

    Thanks.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Lookup Date Value based on 3 Values

    If that takes care of your need, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED]

+ 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