+ Reply to Thread
Results 1 to 4 of 4

Concat with using ' " ' as an argument so I can use the output as a string.

  1. #1
    Registered User
    Join Date
    03-11-2018
    Location
    Kentwood, MI
    MS-Off Ver
    365
    Posts
    2

    Concat with using ' " ' as an argument so I can use the output as a string.

    I am trying to speed up some programming by letting excel do the work. Currently I have two columns with data which will require adding them in order to create a data structure map. C1 is the variable lookup, C2 is the value.

    A1 = 1
    B1 = 100

    I'm currently using:
    = CONCAT("val[?", A1, "] = ", B1, ";")

    and getting:
    val[?1] = 100;

    However, since I need values to be strings I need it to look like this, with quotes around the answers.
    val[? "1"] = "100";

    I tried using a combination of single and double quotes within its own arguments, such as """, '", ""...so forth can't seem to get it to work. Sorry if this is noob question but couldn't seem to find an answer right off when looking also.
    Last edited by gamebot; 03-12-2018 at 02:10 PM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,508

    Re: Concat with using ' " ' as an argument so I can use the output as a string.

    In "old" format ...

    ="val[?"&"""" &A1&""""&"] = "&""""&B1&""";"

    which I am sure you can "translate" into CONCAT format
    Last edited by JohnTopley; 03-11-2018 at 03:18 PM.

  3. #3
    Registered User
    Join Date
    03-11-2018
    Location
    Kentwood, MI
    MS-Off Ver
    365
    Posts
    2

    Re: Concat with using ' " ' as an argument so I can use the output as a string.

    Worked like a real treat using &! Thank you. Ended up doing this:

    Please Login or Register  to view this content.
    Last edited by gamebot; 03-12-2018 at 12:58 AM.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,508

    Re: Concat with using ' " ' as an argument so I can use the output as a string.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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: 12-01-2014, 03:25 PM
  2. [SOLVED] Concat String and Integer variables to create filename
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-03-2014, 07:14 AM
  3. concat string within a loop
    By nikko50 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-10-2013, 02:10 PM
  4. Replies: 3
    Last Post: 04-28-2010, 05:54 PM
  5. Excel VBA String Concat Problem
    By javajoemorgan in forum Excel General
    Replies: 3
    Last Post: 06-08-2009, 01:51 PM
  6. [SOLVED] Invalid "format string" argument in Format fuction
    By jjk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-14-2005, 05:05 PM
  7. Function (array argument, range argument, string argument) vba
    By Witek in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-24-2005, 11:07 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