+ Reply to Thread
Results 1 to 8 of 8

1)Vlookup refer to diff sheet based on date 2)Dropdown populate from 1 cell in each sheet

  1. #1
    Registered User
    Join Date
    02-13-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    12

    1)Vlookup refer to diff sheet based on date 2)Dropdown populate from 1 cell in each sheet

    Geniuses:

    Looking for two things today:
    1)I have a vlookup pointing to a hidden page that will retrieve stats based on the persons name I put in. I need this for 12 other sheets (months) and would like to be able to have the vlookup change to the correct sheet based on the date. Example: If current date is between 1/1/12-2/1/12then vlookup on sheet "January".

    2)I have a combobox that I would like to populate with cell "A2" from each sheet in the workbook. Not sure if this one is possible.

    Thanks,
    - Joe-XT

  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
    52,926

    Re: 1)Vlookup refer to diff sheet based on date 2)Dropdown populate from 1 cell in each sh

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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
    Registered User
    Join Date
    02-13-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: 1)Vlookup refer to diff sheet based on date 2)Dropdown populate from 1 cell in each sh

    Sorry it took me so long to get back -

    I have added a sample workbook per your suggestion. It has hidden sheets (months) and visible sheets (names).

    Thanks again,
    - Joe-XT
    Attached Files Attached Files

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: 1)Vlookup refer to diff sheet based on date 2)Dropdown populate from 1 cell in each sh

    the gaps aren't the same 1 jan to 1 feb inclusive is different from 2nd feb to 1st march
    but if it should be 2jan to 1 feb
    then
    =VLOOKUP(K1,INDIRECT(TEXT(EOMONTH(K1-1,-1)+1,"mmm")&"! A1:R16"),8,FALSE)
    Last edited by martindwilson; 12-16-2012 at 03:58 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    02-13-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: 1)Vlookup refer to diff sheet based on date 2)Dropdown populate from 1 cell in each sh

    Quote Originally Posted by martindwilson View Post
    the gaps aren't the same 1 jan to 1 feb inclusive is different from 2nd feb to 1st march
    Okay - assume they are beginning to end of each month. 1/1/13-1/31/13. Does that help?

    - Joe-XT

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: 1)Vlookup refer to diff sheet based on date 2)Dropdown populate from 1 cell in each sh

    in that case
    =VLOOKUP(K1,INDIRECT(TEXT(EOMONTH(K1,-1)+1,"mmm")&"! A1:R16"),8,FALSE)

  7. #7
    Registered User
    Join Date
    02-13-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: 1)Vlookup refer to diff sheet based on date 2)Dropdown populate from 1 cell in each sh

    Sample Wrong Data Type.PNG
    Quote Originally Posted by martindwilson View Post
    in that case
    =VLOOKUP(K1,INDIRECT(TEXT(EOMONTH(K1,-1)+1,"mmm")&"! A1:R16"),8,FALSE)
    This is what I got...I just pasted in. Should I have added something to that?

    - Joe-XT

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: 1)Vlookup refer to diff sheet based on date 2)Dropdown populate from 1 cell in each sh

    well k1 hasnt got a date in i think cant see what row you are in
    try this one
    edit this goes from 1 to last day of month
    Attached Files Attached Files

+ 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