+ Reply to Thread
Results 1 to 5 of 5

How to add a formula as a filename in a formula

  1. #1
    Registered User
    Join Date
    01-17-2021
    Location
    Malaysia
    MS-Off Ver
    Office 2016
    Posts
    8

    How to add a formula as a filename in a formula

    Hello everyone,

    I have been working on a document where data from 163 files will be pulled into a single master file.

    Given there are a 163, its very tedious to create new line for each document so what did was try to add the filename as a formula. And it doesn't work.

    So this is the first line formula : [1.xlsx]Units$A$5

    I have file 2 to 163 listed in column H where column H is the concatenation Column F & G. Column F is 2 and column G is .xlsx so the concatenation will be 2.xlsx

    So to just simply fasten the process, the formula for file 2 is : [=H2]Units$A$5.

    Is there a way to include filename as a formula into another formula? And if it cannot be done, what other easy ways do I have?
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: How to add a formula as a filename in a formula

    I have read your post and reviewed your file and I still don't understand what you want to do.

    For the data in the file you attached, what is the result you are trying to get? Are you trying to create a formula that links to a cell in the other files? Not following what "Units$A$5" is supposed to mean.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: How to add a formula as a filename in a formula

    Does this help:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by TMS; 07-24-2022 at 03:44 PM.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    01-17-2021
    Location
    Malaysia
    MS-Off Ver
    Office 2016
    Posts
    8

    Re: How to add a formula as a filename in a formula

    For the data in the file you attached, what is the result you are trying to get?

    Are you trying to create a formula that links to a cell in the other files? Yes thats correct. The values are to be pulled from same cell for all files

    I am attaching 1.xlsx for your further review
    Attached Files Attached Files

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: How to add a formula as a filename in a formula

    See post #3

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. formula with variable filename
    By cheesemeister in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-02-2017, 03:16 PM
  2. Change Filename in a Formula in VBA
    By natonstan in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-14-2016, 04:12 PM
  3. [SOLVED] Incorporating filename formula into CSE formula
    By johnmitch38 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-29-2015, 04:03 AM
  4. Formula to return filename in folder based on partial filename
    By Rerock in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-26-2014, 12:28 PM
  5. Help with formula of filename and saving filename as current time
    By hqradio in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2012, 06:10 AM
  6. Reference filename in formula
    By middlectom in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-21-2007, 07:37 PM
  7. filename lookup within formula
    By ss1 in forum Excel General
    Replies: 0
    Last Post: 01-13-2005, 01:11 AM

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