+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    08-09-2009
    Location
    Calif. U.S.A.
    MS-Off Ver
    Excel 2003
    Posts
    6

    Excel 2003 function with variables

    I’m in over my head !!

    On drive “C” I have folder sales
    In sales are yearly folders 2007, 2008, 2009
    In the yearly folders are the monthly workbooks sales 01, sales 02
    In the workbook the sheets are 1, 2, 3, for the day of the month
    i.e. c:\sales\2009\sales 08.xls

    In my sales recap workbook I wish at access daily item mean sales in the other
    Workbooks based on the Current date. I think something like this

    =”c”:\sales\YEAR(A1)’[sales MONTH(A1).xls]DAY(A1)’!$BL$33
    Last edited by braddach; 08-11-2009 at 09:22 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    10,944

    Re: Excel 2003 function with variables

    Use concatenate to build the string and indirect to do the referencing.
    Note that Indirect will only work if the workbook is open

    =INDIRECT( CONCATENATE("c:\sales\YEAR",A1,"’[sales ",MONTH(A1),".xls]",DAY(A1),"’!$BL$33"))

    To have a live link you will need code to covert the text into a real formula.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    08-09-2009
    Location
    Calif. U.S.A.
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Excel 2003 function with variables

    Thanks Andy!

    If the workbook needs to be open the ("c:\sales\YEAR",A1,"’[sales ",MONTH(A1),".xls]", is a moot point but the code =(CONCATENATE("[Logs 0",MONTH(A7),".xls]",DAY(A7),"’!$BM$33"))
    Gives the perfect [sales 08.xls]9’!$BM$33 I’m looking for, now just a little help with converting the text into a real formula.
    Last edited by braddach; 08-10-2009 at 07:40 AM. Reason: new info

  4. #4
    Registered User
    Join Date
    08-09-2009
    Location
    Calif. U.S.A.
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Excel 2003 function with variables

    Must be an ez'er way to get yesterday's avg.'s in a recap I was just try'en to use the date -1 as a refeance.

  5. #5
    Registered User
    Join Date
    08-09-2009
    Location
    Calif. U.S.A.
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Excel 2003 function with variables

    I got it to work
    Thatnk for getting me on the right track

    =INDIRECT(CONCATENATE("'c:\SALES\",YEAR(A1),"\[SALES 0",MONTH(A1),".xls]",DAY(A1),"'!","$BM$33"))

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0