+ Reply to Thread
Results 1 to 3 of 3

Variables inside a formula

  1. #1
    Registered User
    Join Date
    05-26-2006
    Posts
    21

    Variables inside a formula

    Hi Guys,
    I hope you are all doing well. I have a query and I would like your help on that.

    I have 30 excel spreadsheets named 15-Jun.xls,16-Jun.xls,17-Jun.xls....etc. I have lots of data in these. Now I have another spreadsheet Month_of_June.xls. I am using COUNTIF to evaluate some columns in the spreadsheets for each day of the month.

    I have a formula in Month_of_June.xls which is something like

    =COUNTIF('J:\Harish\Analytics\[15-Jun.xls]15-Jun'!$D$4:$D$133,"Harish Kumar")

    Now when I drag, I want it to become something like this

    COUNTIF('J:\Harish\Analytics\[15-Jun.xls]15-Jun'!$D$4:$D$133,"Harish Kumar")
    COUNTIF('J:\Harish\Analytics\[16-Jun.xls]15-Jun'!$D$4:$D$133,"Harish Kumar")
    COUNTIF('J:\Harish\Analytics\[17-Jun.xls]15-Jun'!$D$4:$D$133,"Harish Kumar")
    COUNTIF('J:\Harish\Analytics\[18-Jun.xls]15-Jun'!$D$4:$D$133,"Harish Kumar")

    Only the date should change. The spreadsheet name should change. Is there some method of getting this done?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Variables inside a formula

    See http://www.excelforum.com/excel-gene...same-cell.html
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Variables inside a formula

    Note, though, that since you are working with workbooks and not with sheets within a workbook, INDIRECT as described in the thread shg linked to will only work with open workbooks.

    For closed workbooks, you need the function INDIRECT.EXT, which is available in the free morefunc.xll, which can be downloaded here:
    http://download.cnet.com/Morefunc/30...-10423159.html

    cheers

+ 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