+ Reply to Thread
Results 1 to 4 of 4

look up column according to today's date

  1. #1
    Registered User
    Join Date
    09-16-2010
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    6

    Question look up column according to today's date

    I am trying to put a report together that feeds from others and will be updated monthly somewhat automatically.
    My spreadsheet will be the result of other workbooks in the same folder being updated monthly and feeding into it. Some of the reports I am using add a new column on for each month. I want my spreadsheet to pull only the present month from the report without having to update the formulas monthly.

    The months as new columns are created are added to the new columns as the first of that month (9/1/10). As of now I have written a formula that will return the first day of the current month.(=TODAY()-DAY(TODAY())+1)) Now I am trying to figure out how to scan the row for the current month and return the corresponding column to my spreadsheet.

    In other words, the top row of a spreadsheet is the first day of the month. I want the column below the first day of the present month to feed into another workbook without updating the formulas every month.
    I hope this is clear enough
    Thanks!
    Last edited by allison15; 09-16-2010 at 10:57 AM.

  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: look up column according to today's date

    If the dates are ascending properly from left to right, you can use a fuzzy MATCH() command on row1 to get the column number of the current month:

    =MATCH(TODAY(), Sheet1!$1:$1, 1)

    It's the 1 at the end that makes the match to the first day of the current month.

    Now that you have the correct column Number, use that to adjust your lookup formulas in the other workbook.
    _________________
    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
    Registered User
    Join Date
    09-16-2010
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    6

    Question Re: look up column according to today's date

    Sorry I'm not really understanding what you are suggesting. I have attatched an example to better explain my problem. I want the column corresponding to the present month (whatever that may be) in sheet 2 to insert itself automatically in column B on sheet 1. The information on sheet 2 will be updated monthly.
    Sorry to be a pain! Thanks for all your help!
    Attached Files Attached Files
    Last edited by allison15; 09-16-2010 at 10:57 AM.

  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: look up column according to today's date

    Put this in B5 and copy down.

    =INDEX(Sheet2!$B$4:$G$6, MATCH($A5, Sheet2!$A$4:$A$6, 0), MATCH(TODAY(), Sheet2!$B$3:$G$3, 1))

+ 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