+ Reply to Thread
Results 1 to 32 of 32

Make the vlookup function dynamic for different computers

  1. #1
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Make the vlookup function dynamic for different computers

    https://youtu.be/gCvlAtUIaZc

    I am doing exactly what is being done in the video in the link above. The problem I have though is, this will only work on a specific computer because of the directory. What I need to do is transfer both the excel files to many computers. So when I do that and open the file that has vlookup formulas embedded on a different computer, it just says #REF. It is not dynamic. How do I make it so that I would never have to worry about entering/changing formulas on every computer?

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Make the vlookup function dynamic for different computers

    Whats your formula exactly?
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Make the vlookup function dynamic for different computers

    For the reason of cross the files function work is, Excel is open the file in the computer by the address have.

    Untest,
    It may be work when the file is saved in the same place in other computers.
    then use the indirect functions.

    combine in a folder, and sent to them, then use cell function, in a random place use this formula, it create a path to anther workbook.
    =REPLACE(CELL("filename"),SEARCH("folder name"&"/",CELL("filename"))+count of folder name+1,100,"["& other workbok filename"]")

    then use INDIRECT function,
    example, (given above formula in A1)
    =indirect("'"&"A1"&"sheet1'!A1)+A2

    "folder name", the folder that you sent to other.
    other workbok filename, include the .xls
    "count of folder name", can use the LEN function to help if the filename is too long.
    the CELL("filename") is the actual formula, don't change!!
    Last edited by BoredWorker; 06-29-2017 at 08:45 AM.
    Hope you can learn every time you visit here.

    If you still confuse on how it work, kindly ask or go to
    i) Formula - Formula (Ribbon) > Formula Auditing (Section) > Evaluate Formula > Evaluate; or
    ii) VBA/Code - Click F8 to see how it work step by step.

    It it take care of your question, Please:
    Mark tread as [Solved] [Thread Tools->Mark thread as Solved]
    ;and
    Click *Add Reputation to thank anyone solved your question.

  4. #4
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Re: Make the vlookup function dynamic for different computers

    =VLOOKUP(A3,'C:\Users\Ted\Desktop\Files\[myfile.xlsx]myfile'!$A:$C,3,0)

  5. #5
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Re: Make the vlookup function dynamic for different computers

    I don't understand what you have there. Please look at the formula I have and let me know how I can modify that.

  6. #6
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Re: Make the vlookup function dynamic for different computers

    Quote Originally Posted by BoredWorker View Post
    For the reason of cross the files function work is, Excel is open the file in the computer by the address have.

    Untest,
    It may be work when the file is saved in the same place in other computers.
    then use the indirect functions.

    combine in a folder, and sent to them, then use cell function, in a random place use this formula, it create a path to anther workbook.
    =REPLACE(CELL("filename"),SEARCH("folder name"&"/",CELL("filename"))+count of folder name+1,100,"["&other workbok filename[/COLOR]"]")

    then use INDIRECT function,
    example, (given above formula in A1)
    =indirect("'"&"A1"&"sheet1'!A1)+A2

    "folder name", the folder that you sent to other.
    other workbok filename, include the .xls
    "count of folder name", can use the LEN function to help if the filename is too long.
    the CELL("filename") is the actual formula, don't change!!
    I don't understand what you have there. Please look at the formula I have and let me know how I can modify that.

  7. #7
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Re: Make the vlookup function dynamic for different computers

    Quote Originally Posted by Special-K View Post
    Whats your formula exactly?
    =VLOOKUP(A3,'C:\Users\Ted\Desktop\Files\[myfile.xlsx]myfile'!$A:$C,3,0)

  8. #8
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Make the vlookup function dynamic for different computers

    Step 1, create a folder, name: Lazy
    put in all your file that linked together

    Step 2,
    in your existing file, where you put this formula,
    =VLOOKUP(A3,'C:\Users\Ted\Desktop\Files\[myfile.xlsx]myfile'!$A:$C,3,0)
    in Z1 put in this,
    =REPLACE(CELL("filename"),SEARCH("Lazy"&"/",CELL("filename"))+5+1,100,"["&myfile.xlsx&"]")

    Step 3,
    replace your formula to
    =VLOOKUP(A3,indirect("'"&$Z$1&"myfile'!$A:$C",3,0)

    Step 4,
    Sent the whole folder to them.

    Please test on your own... i only have one computer..... cannot test
    PS: seldom email able to sent folder, you may use google drive or other.

    Advice: better to include that sheet of data in one file. this might cause lag for few minute when too many vlookup function is use together with this case issue.
    Last edited by BoredWorker; 06-29-2017 at 08:56 AM.

  9. #9
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Re: Make the vlookup function dynamic for different computers

    Quote Originally Posted by BoredWorker View Post
    Step 1, create a folder, name: Lazy
    put in all your file that linked together

    Step 2,
    in your existing file, where you put this formula,

    in Z1 put in this,
    =REPLACE(CELL("filename"),SEARCH("Lazy"&"/",CELL("filename"))+5+1,100,"["&myfile.xlsx&"]")

    Step 3,
    replace your formula to
    =VLOOKUP(A3,indirect("'"&$Z$1&"myfile'!$A:$C",3,0)

    Step 4,
    Sent the whole folder to them.

    Please test on your own... i only have one computer..... cannot test
    PS: seldom email able to sent folder, you may use google drive or other.

    Advice: better to include that sheet of data in one file. this might cause lag for few minute when too many vlookup function is use together with this case issue.
    Your step 3 is incorrectly formatted. There are too many arguments in the function.

  10. #10
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Make the vlookup function dynamic for different computers

    Sorry for the basic mistake...

    =VLOOKUP(A3,indirect("'"&$Z$1&"myfile'!$A:$C"),3,0)

  11. #11
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Re: Make the vlookup function dynamic for different computers

    Quote Originally Posted by BoredWorker View Post
    Sorry for the basic mistake...

    =VLOOKUP(A3,indirect("'"&$Z$1&"myfile'!$A:$C"),3,0)
    It doesn't even work on my own computer. It says #VALUE!

  12. #12
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Make the vlookup function dynamic for different computers

    Can it know the result of Z1 is look like this?

    'C:\Users\Ted\Desktop\Files\[myfile.xlsx]

  13. #13
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Re: Make the vlookup function dynamic for different computers

    Quote Originally Posted by BoredWorker View Post
    Can it know the result of Z1 is look like this?

    'C:\Users\Ted\Desktop\Files\[myfile.xlsx]
    The result in cell Z1 is also #VALUE!

  14. #14
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Make the vlookup function dynamic for different computers

    ok, now the reason that cause vlookup function failed is the value Z1 already have error.

    Sorry for another mistake.....

    =REPLACE(CELL("filename"),SEARCH("Lazy"&"\",CELL("filename"))+4+1,100,"["&myfile.xlsx&"]")

    And the result should be

    C:\Users\Ted\Desktop\lazy\[myfile.xlsx]

  15. #15
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Re: Make the vlookup function dynamic for different computers

    Quote Originally Posted by BoredWorker View Post
    ok, now the reason that cause vlookup function failed is the value Z1 already have error.

    Sorry for another mistake.....

    =REPLACE(CELL("filename"),SEARCH("Lazy"&"\",CELL("filename"))+4+1,100,"["&myfile.xlsx&"]")

    And the result should be

    C:\Users\Ted\Desktop\lazy\[myfile.xlsx]
    Now it says #NAME?

  16. #16
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Make the vlookup function dynamic for different computers

    Oppss.....

    another mistake, I found out already in past 10 minute and forget to put it in....

    =REPLACE(CELL("filename"),SEARCH("Lazy"&"\",CELL("filename"))+4+1,100,"["&"myfile.xlsx"&"]")

  17. #17
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Make the vlookup function dynamic for different computers

    Indirect does not work on closed workbooks.

    I would suggest instructing the end users to not put the files on their desktop.
    Instead put them in a designated folder on the hard drive, so it's the same for everyone.
    Like C:\ExcelFiles\filename.xls

  18. #18
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Re: Make the vlookup function dynamic for different computers

    Quote Originally Posted by BoredWorker View Post
    Oppss.....

    another mistake, I found out already in past 10 minute and forget to put it in....

    =REPLACE(CELL("filename"),SEARCH("Lazy"&"\",CELL("filename"))+4+1,100,"["&"myfile.xlsx"&"]")
    It's almost working. It says C:\Users\Ted\Desktop\lazy\[l[myfile.xlsx]. I see an error in there. Why is there an "l" before myfile?

  19. #19
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Make the vlookup function dynamic for different computers

    I cann't see any mistake here.

    You try to paste again the formula.

    =REPLACE(CELL("filename"),SEARCH("Lazy"&"\",CELL("filename"))+4+1,100,"["&"myfile.xlsx"&"]")

  20. #20
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Re: Make the vlookup function dynamic for different computers

    Quote Originally Posted by BoredWorker View Post
    I cann't see any mistake here.

    You try to paste again the formula.

    =REPLACE(CELL("filename"),SEARCH("Lazy"&"\",CELL("filename"))+4+1,100,"["&"myfile.xlsx"&"]")

    Now the problem is in the cells. Does this look right? Because it is giving me an error #REF!
    =VLOOKUP(A3,INDIRECT("'"&$Z$1&"myfile'!$A:$C"),3,0)

    And could you also tell me what 4+1,100 is? How are you getting that?

  21. #21
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Make the vlookup function dynamic for different computers

    4+1 in the formula is in the

    =replace(,"here",,)

    the search is allocate the number at C:\Users\Ted\Desktop\"HERE"lazy\[myfile.xlsx]
    after add in the 4+1,
    it turn allocate at C:\Users\Ted\Desktop\lazy\"HERE"[myfile.xlsx]

    And 100 is
    =replace(,,"here",)
    to replace how many character after the allocate point.
    100 is to avoid the character of the file is too long.

    Now the problem is in the cells. Does this look right? Because it is giving me an error #REF!
    =VLOOKUP(A3,INDIRECT("'"&$Z$1&"myfile'!$A:$C"),3,0)
    try to open the located workbook, the reason is said by Jonmo1. you may try to google about it.

  22. #22
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Re: Make the vlookup function dynamic for different computers

    Quote Originally Posted by BoredWorker View Post
    4+1 in the formula is in the

    =replace(,"here",,)

    the search is allocate the number at C:\Users\Ted\Desktop\"HERE"lazy\[myfile.xlsx]
    after add in the 4+1,
    it turn allocate at C:\Users\Ted\Desktop\lazy\"HERE"[myfile.xlsx]

    And 100 is
    =replace(,,"here",)
    to replace how many character after the allocate point.
    100 is to avoid the character of the file is too long.



    try to open the located workbook, the reason is said by Jonmo1. you may try to google about it.
    If I place the files in the C: drive, for example, then according to Jonmo1, I am placing them separately and not in the folder named "Lazy". Now, the Z1 formula will require changes, which I don't want. I actually want all the files in a folder.

  23. #23
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Make the vlookup function dynamic for different computers

    ok, one by one,

    first, did the vlookup function well when you open both workbook?

    Second,
    try to open the located workbook, the reason is said by Jonmo1. you may try to google about it.
    I just tell you the reason, the indirect cannot function to a closed workbook, not solution.....

  24. #24
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Re: Make the vlookup function dynamic for different computers

    Quote Originally Posted by BoredWorker View Post
    ok, one by one,

    first, did the vlookup function well when you open both workbook?

    Second,

    I just tell you the reason, the indirect cannot function to a closed workbook, not solution.....
    Yes, I did everything as you told me to do it. The Z1 cell works, but the other cells says #REF!

  25. #25
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Make the vlookup function dynamic for different computers

    Sorry, I just have a test just now....

    My here also not function at all.....

    Sorry for waste your time.....

  26. #26
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Re: Make the vlookup function dynamic for different computers

    Quote Originally Posted by BoredWorker View Post
    Sorry, I just have a test just now....

    My here also not function at all.....

    Sorry for waste your time.....
    It's alright. You don't have to be sorry about anything.
    I appreciate you spending the time to help me out. Thanks.

    However, do you not know any other way of getting this solved?

  27. #27
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Re: Make the vlookup function dynamic for different computers

    Quote Originally Posted by Jonmo1 View Post
    Indirect does not work on closed workbooks.

    I would suggest instructing the end users to not put the files on their desktop.
    Instead put them in a designated folder on the hard drive, so it's the same for everyone.
    Like C:\ExcelFiles\filename.xls
    Can you help me out?
    BoredWorker helped as much as he could, but we weren't successful at the end.

  28. #28
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Make the vlookup function dynamic for different computers

    At I said in beginning, just keep all data in one file......
    it can be put different sheets to keep thing simple.

    when the situation that the file is too large to sent by email, try use google drive.

    or, after you vlookup, copy and paste as value to cover the answer.
    the result is still can view, but it not convince to other that is the result from vlookup...LOL

    or,

    and jonmo1 suggestion is let other who use the file put in a selected location, like save in C:\ExcelFiles\filename.xls
    your part
    step 1, open a folder to local hard disk, create a file name call Excelfiles
    step 2, save the file in and open the file do the vlookup.
    step 3, sent the receiver part below to them.

    Receiver part
    step 1, open a folder to local hard disk, create a file name call Excelfiles
    step 2, move the file receive to this folder
    step 3, and use as normal.

    Untested as well...

  29. #29
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Re: Make the vlookup function dynamic for different computers

    Quote Originally Posted by BoredWorker View Post
    At I said in beginning, just keep all data in one file......
    it can be put different sheets to keep thing simple.

    when the situation that the file is too large to sent by email, try use google drive.

    or, after you vlookup, copy and paste as value to cover the answer.
    the result is still can view, but it not convince to other that is the result from vlookup...LOL

    or,

    and jonmo1 suggestion is let other who use the file put in a selected location, like save in C:\ExcelFiles\filename.xls
    your part
    step 1, open a folder to local hard disk, create a file name call Excelfiles
    step 2, save the file in and open the file do the vlookup.
    step 3, sent the receiver part below to them.

    Receiver part
    step 1, open a folder to local hard disk, create a file name call Excelfiles
    step 2, move the file receive to this folder
    step 3, and use as normal.

    Untested as well...
    I can't keep all the sheets in one file because one of the files gets updated everyday. Anyways, no problem. I will figure something out.

  30. #30
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Make the vlookup function dynamic for different computers

    yes, one more things,

    did you ever use Google sheet?

    It mostly similar to excel, but it can share to other to edit or view only permission.

    weakness,
    if personal ID, the storage is 5 GB. the upgrade of storage is need to pay.

  31. #31
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Re: Make the vlookup function dynamic for different computers

    Quote Originally Posted by BoredWorker View Post
    yes, one more things,

    did you ever use Google sheet?

    It mostly similar to excel, but it can share to other to edit or view only permission.

    weakness,
    if personal ID, the storage is 5 GB. the upgrade of storage is need to pay.
    I am not gonna worry about all that.

  32. #32
    Registered User
    Join Date
    06-28-2017
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    25

    Re: Make the vlookup function dynamic for different computers

    Quote Originally Posted by ted1234 View Post
    I am not gonna worry about all that.
    https://www.excelforum.com/excel-pro...formation.html
    Can you help me out?

+ 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. [SOLVED] Make an index and match function dynamic
    By concatch in forum Excel General
    Replies: 3
    Last Post: 08-18-2014, 02:35 PM
  2. Replies: 1
    Last Post: 07-18-2013, 09:31 AM
  3. VLookup formula (how to make it dynamic) in vba
    By david1816 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-26-2012, 10:10 AM
  4. Replies: 2
    Last Post: 11-05-2011, 03:26 PM
  5. Replies: 3
    Last Post: 08-01-2011, 05:38 AM
  6. Dynamic VLOOKUP function
    By Barb Reinhardt in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  7. [SOLVED] Dynamic VLOOKUP function
    By Barb Reinhardt in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM

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.6.0 RC 1