+ Reply to Thread
Results 1 to 2 of 2

Connection pathway using text in a reference cell to change part of the pathways name.

  1. #1
    Registered User
    Join Date
    10-02-2015
    Location
    Baltimore, US
    MS-Off Ver
    2013
    Posts
    1

    Connection pathway using text in a reference cell to change part of the pathways name.

    In doing some data analysis, I'm using a codebook key and/or frequently extracting data cells from databases in other excel workbooks using connections.

    I've come up with an issue connecting to a location using a string of text created using a reference cell within the sheet I am doing the calculations. I have databases for different countries all saved to my hard drive. Based on the text string with the country name in a reference cell, (B2), I would the connection pathway in cell B4 to change and link to the information specific to the reference cell country. If I put "US" in cell B2 I want the connection name to change to "'c:\users\documents\project\database\consumption\[data US.xlsx]sheet1'!N2" or if b2 was China I would want the connection string to read "'c:\users\documents\project\database\consumption\[data China.xlsx]sheet1'!N2"

    I have tried using the concatenate function to join the reference cell text with other parts of the pathways name, but I don't know what kind of function or method of using connections to call up that text string as the pathway.

    Any help would be fantastic!

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Connection pathway using text in a reference cell to change part of the pathways name.

    Hi csynk

    Welcome to the Forum!!!

    See if this helps. Place the Code in the Sheet Module.

    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ 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] How to reference Timevalue to change a cell's text to another text
    By gutchek in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-17-2014, 02:44 PM
  2. [SOLVED] Use the Like SQL statement to find a part of text in database connection
    By Megatronixs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-11-2014, 08:21 AM
  3. [SOLVED] pathway reference to file givs out of range errormsg (pathway is set as variable)
    By phila7475 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-20-2014, 04:51 AM
  4. [SOLVED] I would like to change part of a workbook/worksheet reference with data from another cell.
    By hintonm1811 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-11-2014, 11:55 AM
  5. Replies: 8
    Last Post: 01-28-2014, 05:15 PM
  6. Skip Manual Selection of Pathway to Reference Workbook
    By SteVo556 in forum Excel General
    Replies: 1
    Last Post: 01-03-2014, 11:21 PM
  7. [SOLVED] reference part of cell address from button and part of another cell
    By JJGF in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-24-2012, 04:48 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