+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : Using spreadsheet as calendar and placing last date on different spreadsheet

  1. #1
    Registered User
    Join Date
    01-09-2012
    Location
    Indiana
    MS-Off Ver
    Excel 2007
    Posts
    6

    Using spreadsheet as calendar and placing last date on different spreadsheet

    Hello,

    I need to figure out a formula that will pull the most recent date from a calendar spreadsheet that I am using and place it on a different spreadsheet. If you look at the file I have attached you will see the calendar on the "Employee1" sheet. I need the most recent date that has hours in it (January 14 in this example) to show in B2 on Sheet1. The file I have attached is an example and I would use the formula on a much larger file with many calendars. I just need the core formula. Thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Using spreadsheet as calendar and placing last date on different spreadsheet

    If you make sure that your sheet names in column A are exactly the same as the names of the other sheets in the book (in your example file A1 says "Open 1", with a space, whereas the sheet is called "Open1", no space) then in B1 you can use the formula:

    =MAX(IF(INDIRECT("'" & A1 & "'!B2:AF13")<>"",DATE(YEAR(NOW()),ROW(INDIRECT("'" & A1 & "'!B2:AF13"))-1,COLUMN(INDIRECT("'" & A1 & "'!B2:AF13"))-1)))

    This is an array formula and must be entered with Ctrl-Shift-Enter, but it will return the last non-blank date on the sheet named in cell A1 - although you'll have to format the cell to date format.

  3. #3
    Registered User
    Join Date
    01-09-2012
    Location
    Indiana
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Using spreadsheet as calendar and placing last date on different spreadsheet

    Ok, I entered the formula and changed the cell format to date. Now, when I attempt to plug hours into the calendar it changes it to a date and gives me a 5 digit number on the first sheet that makes no sense. Check it out on my attachment. I tried entering 5 (for 5 hours of work) on January 1 and it changed it to 1/5/1900 and displays 40909 on the first sheet.Book2.xlsx

  4. #4
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Using spreadsheet as calendar and placing last date on different spreadsheet

    Sorry, you've formatted the wrong column as a date. It's the cell that contains the formula that needs to be formatted to date format - 40909 is the numeric value of the date 1/1/12, whereas the number 5 corresponds to the date 1/5/1900.

+ 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