+ Reply to Thread
Results 1 to 9 of 9

Wanting to retrieve values from external workbook by searching name of column.

  1. #1
    Registered User
    Join Date
    10-03-2018
    Location
    Northern Ireland
    MS-Off Ver
    2016
    Posts
    4

    Wanting to retrieve values from external workbook by searching name of column.

    Hey guys,

    So I have 2 workbooks which I am using. One workbook (lets call it signals) never changes it's format and contains a row of many signal names (example of a signal name : 'RF_Decoding_analysis::RF_Avg_SNR_RR'). This workbook is created from data exported from a program every time a new test is ran creating a CSV file. Under each signal I would like to retrieve the last value in the column. The other workbook (lets call it values) is where I would like to store the 'searched for' values of signals.

    For the signal workbook, this will be overwritten every time a new test is ran as there will be different values under each signal. The main idea behind what I am trying to do is to allow the values workbook to auto-populate with the signal values each time a new test is done. A pathway or flow would look like such:

    VALUES WORKBOOK - GO TO SIGNALS WORKBOOK - SEARCH FOR SIGNAL NAME - GO TO THAT COLUMN - RETRIEVE LAST VALUE - PLACE IN VALUES WORKBOOK - REPEAT FOR ALL SIGNAL NAMES AND VALUES.

    I have tried multiple options such as 'VLOOKUP' and 'INDIRECT' but i find when I come to use 'VLOOKUP' I can't insert or dont know how to insert the address of the column that the signal name is in to get the value.

    Any advice or solution would be greatly appreciated!

    Thanks,

    Ryan

  2. #2
    Registered User
    Join Date
    01-28-2015
    Location
    TX, USA
    MS-Off Ver
    2013
    Posts
    69

    Re: Wanting to retrieve values from external workbook by searching name of column.

    Hey Ryan,

    A workbook or screenshot for context would be helpful. But, try this.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Column 1 should contain information that identifies which row to look in.

    the number 2,
    the number 3,
    the number 4
    return the corresponding column number

    Hope that helps.

  3. #3
    Registered User
    Join Date
    10-03-2018
    Location
    Northern Ireland
    MS-Off Ver
    2016
    Posts
    4

    Re: Wanting to retrieve values from external workbook by searching name of column.

    Hey, thanks very much for your reply!I have attached the 2 workbooks 'Values.xlsx' and 'Signals.csv' to give more of an idea of what I'm trying to achieve. The main principle is an idea of automation wherein, when a new signals file is made and hence overwrites the old version, the values worksheet will be auto-populated and updated without any interaction or editing in the Signals.csv workbook.

    In relation to the solution you have suggested, a '0' is returned into the cell C6 (ref to image) rather than the actual value. I'm needing this formula to search for the actual signal name then go to the column where all the values for that particular signal are and then take the last value in that column.

    Values.xlsx

    Signals.csv
    Last edited by R=MCC; 10-04-2018 at 04:57 AM.

  4. #4
    Registered User
    Join Date
    01-28-2015
    Location
    TX, USA
    MS-Off Ver
    2013
    Posts
    69

    Re: Wanting to retrieve values from external workbook by searching name of column.

    What you need to do is make sure that the information is calling right.
    In order to do that, you need to do 2 things.
    First, make sure the correct cell is being looked up.

    In this case, I changed Cell B1 in 'Signals' to match Cell C6 in 'Values'

    Both read as "SNR_average_(dB)"

    In the 'Values' Workbook, I used HLOOKUP and noting that you chose (for some ungodly reason) to go to column 'UX' I changed the row number to 'UX69'
    Then I locked it with the $ '$UX$69'

    Formula breakdown :
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Remember if you have a specific sheet to lookup, then you need to include it in your reference
    Please Login or Register  to view this content.
    Attached Images Attached Images

  5. #5
    Registered User
    Join Date
    10-03-2018
    Location
    Northern Ireland
    MS-Off Ver
    2016
    Posts
    4

    Re: Wanting to retrieve values from external workbook by searching name of column.

    I've managed to amend the formula as you have shown, however I need the formula to find the last or highest value in that column (preferably last) - instead at the moment it only returns the value I am looking for when the row the value is in is inserted into the formula - in the case above '2' which gives an output of '69'.

    Therefore it will look up the signal name to get the column it's in and then take the last or highest value in that column which could be placed anywhere from row 2 to row 69.

  6. #6
    Registered User
    Join Date
    01-28-2015
    Location
    TX, USA
    MS-Off Ver
    2013
    Posts
    69

    Re: Wanting to retrieve values from external workbook by searching name of column.

    Then instead, you might want to use this formula:

    Solution
    Please Login or Register  to view this content.
    Be sure to change the column to the appropriate name.

    Also, the LARGE function looks for the Nth largest number.
    So 1, is the first largest. 2 is the second and so on.

    if you used the formula as shown (with adjustments for column) $B,$C and so on
    You should get results more akin to what you're looking for.

    Tip
    In the future, you might want to keep the names you are looking up on the same orientation for lookup purposes.
    Then the existing formula would be something like:
    Please Login or Register  to view this content.
    Hope that helps.

  7. #7
    Registered User
    Join Date
    10-03-2018
    Location
    Northern Ireland
    MS-Off Ver
    2016
    Posts
    4

    Re: Wanting to retrieve values from external workbook by searching name of column.

    I tried using the LARGE function on it's own with the column name inserted (SNR_average_dB) and its returning '#NAME?'. Do I have to combine HLOOKUP & LARGE or just use LARGE?

    Thanks!

  8. #8
    Registered User
    Join Date
    01-28-2015
    Location
    TX, USA
    MS-Off Ver
    2013
    Posts
    69

    Re: Wanting to retrieve values from external workbook by searching name of column.

    Hlookup is for specific cell returns. While it could be modified to do what you want, LARGE is the only one you need in the case of the largest number.

    If you haven't named the Range then it would be something like:
    Please Login or Register  to view this content.
    If you have named the Range then it would be something like:
    Please Login or Register  to view this content.
    You can check the name with Ctrl+F3.
    To name a Range, select the range you wish to group(click and drag over the area you want), and name it accordingly (example: SNR_average_dB)
    The name name of any range you have selected will appear in the upper left corner of the Worksheet, just up and to the left of Cell A1
    If you need to edit it, you will need to go to the Name Manager as mentioned above. For your reference the Name Manager is in the FORMULAS Ribbon
    Cheers. I hope this helps.
    Last edited by Entregan; 10-12-2018 at 08:14 AM.

  9. #9
    Registered User
    Join Date
    01-28-2015
    Location
    TX, USA
    MS-Off Ver
    2013
    Posts
    69

    Re: Wanting to retrieve values from external workbook by searching name of column.

    Alternatively, you would need to modify your database as illustrated in the SignalsMod2.csv
    to search for the last item in a given list. There are formulas listed along the top row
    This takes advantage of the MAX() Function and the VLOOKUP() and LARGE() functions.
    This is where you would use
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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. Replies: 2
    Last Post: 06-05-2018, 04:06 PM
  2. Retrieve values from closed workbook
    By intex in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-25-2014, 04:13 PM
  3. [SOLVED] Help with searching external workbook for specified data and performing math against it
    By photodotexe in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-19-2014, 04:50 PM
  4. Replies: 3
    Last Post: 12-04-2013, 09:59 PM
  5. Replies: 1
    Last Post: 06-21-2012, 03:55 PM
  6. Replies: 2
    Last Post: 10-20-2010, 07:23 AM
  7. Replies: 14
    Last Post: 10-19-2010, 11:52 AM

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