+ Reply to Thread
Results 1 to 10 of 10

excel horizontal lookup giving old data when source file is hidden

  1. #1
    Registered User
    Join Date
    02-20-2014
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    36

    excel horizontal lookup giving old data when source file is hidden

    Hi,

    Not sure if the title is clear, but the issue is complex.

    A file (we call it the "destination file") is located in a public network folder and contains a horizontal lookup formula (in Dutch) :

    =HORIZ.ZOEKEN(C4;'k:\Persoonlijk\HRM\Undisclosed\Team\Vakantieplanners\[vakantieplannerforcalculation.xlsm]Statistieken 1'!$12:$40;23;0)

    What it does : based upon entry of the user name in cell C4, the formula retrieves a number in the source file. This source file is located in a non-public folder, to which I have access, nobody else does. I emphasize it because it may be cause of the problem. The reason I do this, is that the source file also contains confidential information.

    The problem : when I enter someone's user name in C4, I always obtain the correct data (so the result is equal to the info in the source file). When other people enter their own name, they receive other info and it usually is info which is outdated. As if they "see" a previous version of the source file. So the info they receive, has always been correct on a certain moment in time, but it is not anymore.

    Who can help me ? Thanks !

  2. #2
    Valued Forum Contributor PaulSP8's Avatar
    Join Date
    11-21-2017
    Location
    Chorley, England
    MS-Off Ver
    2013 & 2021
    Posts
    437

    Re: excel horizontal lookup giving old data when source file is hidden

    Quote Originally Posted by jokkebal View Post
    What it does : based upon entry of the user name in cell C4, the formula retrieves a number in the source file. This source file is located in a non-public folder, to which I have access, nobody else does. I emphasize it because it may be cause of the problem. The reason I do this, is that the source file also contains confidential information.
    You suspect correctly, if the data is in a place the user doesn't have access to then they won't be able to update the values.

    Can you make a copy of the file that doesn't contain the confidential information and have the users point to that instead?

  3. #3
    Registered User
    Join Date
    02-20-2014
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: excel horizontal lookup giving old data when source file is hidden

    Hi Paul,
    Thanks for your reply. It remains a mistery why it gives something at all in that case, and why it seems to give the next-to-last figure... Looks like the system keeps old files in layers in its memory, where I only see the upper layer and all other ones the one below it...
    Anyhow, let's move on to your alternative. I was thinking of that as well, but this all happens in macros and I don't know how I can save a part of a worksheet in VBA. I explain :
    The abovementioned source file is already an extract of one worksheet out of the "mother-workbook" using the VBA :

    ThisWorkbook.Sheets("Ingaveblad").Copy
    ActiveWorkbook.SaveAs "K:\Persoonlijk\HRM\Public\Verlofplanner\vakantieplannerBreemessheet1.xlsm", FileFormat:=52 "ThisWorkbook.SaveCopyAs".

    But I don't know how to extract some lines out of a file and save them into a new file. Maybe you can help ?

  4. #4
    Valued Forum Contributor PaulSP8's Avatar
    Join Date
    11-21-2017
    Location
    Chorley, England
    MS-Off Ver
    2013 & 2021
    Posts
    437

    Re: excel horizontal lookup giving old data when source file is hidden

    Quote Originally Posted by jokkebal View Post
    Looks like the system keeps old files in layers in its memory, where I only see the upper layer and all other ones the one below it...
    I couldn't say for sure but I'd assume some kind of caching was going on there, yeah

    Quote Originally Posted by jokkebal View Post
    But I don't know how to extract some lines out of a file and save them into a new file. Maybe you can help ?
    I can certainly try, is there any kind of identifier that we could look for in the data? Is it just a certain column (or columns) that the data occupies?

    Perhaps we can delete everything that isn't neccessary once we've copied the worksheet and then save it?

  5. #5
    Valued Forum Contributor PaulSP8's Avatar
    Join Date
    11-21-2017
    Location
    Chorley, England
    MS-Off Ver
    2013 & 2021
    Posts
    437

    Re: excel horizontal lookup giving old data when source file is hidden

    In fact, looking at your formula you're only interested in Column I, so you might be able to do something as simple as;

    Please Login or Register  to view this content.
    Adjust columns to suit your data?

  6. #6
    Registered User
    Join Date
    02-20-2014
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: excel horizontal lookup giving old data when source file is hidden

    Paul,
    First, sorry for late reply.

    We could use your solution BUT the lines we would keep, using that solution, are formulas. So deleting the rest would annihilate the formulas. I was therefore thinking of another solution : copy the file to a public folder but password-protect the file. I tried the two following solutions, none works.


    Please Login or Register  to view this content.
    Problem : the sheet "Statistieken 1" contains formula links to other sheets in the workbook. By extracting it with the above code, I create a new file but the formula's remain, referring to the file in the hidden directory. So back to the initial problem.

    So I tried this :

    Please Login or Register  to view this content.
    Problem : this results in an error message.

    So ideally, I would like to use the first code, but then save the whole thing as values.


    I
    Last edited by jokkebal; 11-05-2018 at 10:18 AM.

  7. #7
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: excel horizontal lookup giving old data when source file is hidden

    Why not in the code paul suggested copy column I and then paste special as values. then the formula issue is irrelevant

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    02-20-2014
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: excel horizontal lookup giving old data when source file is hidden

    Hi Davsth,

    Thanks for your support. As a reply to your question :

    Because I now realize that copying the entire worksheet as a password-protected file in the public folder is a much easier solution. But that has nothing to do anymore with the initial title of this post, so I will shut this one down and start a new one with that request.
    Josse.

  9. #9
    Valued Forum Contributor PaulSP8's Avatar
    Join Date
    11-21-2017
    Location
    Chorley, England
    MS-Off Ver
    2013 & 2021
    Posts
    437

    Re: excel horizontal lookup giving old data when source file is hidden

    Hey Josse

    I know you've marked this thread as solved, but I think you're over complicating it a little with the whole protected workbook thing. As davsth suggested you can remove the need for the formula quite easily.

    Please Login or Register  to view this content.
    Doing that will remove the formulas from Column I and you've no need to worry about it being protected?

  10. #10
    Registered User
    Join Date
    02-20-2014
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: excel horizontal lookup giving old data when source file is hidden

    It works ! Thanks to both of you.

+ 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] lookup if my lookup array with my data position is vertical and horizontal
    By daboho in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-29-2015, 05:35 AM
  2. Replies: 1
    Last Post: 07-11-2015, 01:04 AM
  3. Replies: 2
    Last Post: 06-14-2013, 05:28 AM
  4. Copying formula down with horizontal source data
    By NDF in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 05-26-2013, 10:38 PM
  5. source file:Vertical to horizontal
    By booklou in forum Excel General
    Replies: 1
    Last Post: 06-22-2011, 04:43 AM
  6. Reading/lookup Data from excel by giving a querry
    By helloexcel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-30-2008, 07:13 PM
  7. Hidden source data
    By Zadig Galbaras in forum Excel General
    Replies: 2
    Last Post: 08-18-2006, 11:45 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