+ Reply to Thread
Results 1 to 5 of 5

Add quotes to each element of an array

  1. #1
    Forum Contributor
    Join Date
    07-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    476

    Add quotes to each element of an array

    So if I have an array (Class 1, Class 2, Class 3) and I join the array then split it so the array is Array2("Class 1", "Class 2", "Class 3") Is there a way to rejoin the array without looping so that I can evaluate the following into another array

    Please Login or Register  to view this content.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Add quotes to each element of an array

    What does this mean?
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Contributor
    Join Date
    07-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    476

    Re: Add quotes to each element of an array

    So if I join an array using Join(array, ",") I get a text string, but if I try to use that string in a formula it doesn't work because each element needs to have quotes in it?

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Add quotes to each element of an array

    What result do you want from what input?
    Could you give a couple of examples?

  5. #5
    Forum Contributor
    Join Date
    07-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    476

    Re: Add quotes to each element of an array

    Yep. So let's say I have an Set of Data pulls into the array1(A, B, C). Then I use Join to get it into a single string as Array2 = Join(array1, ","). Now if I want to push that back into an evaluation of Evaluate(If(Array(TRUE, TRUE, TRUE), Array2)). I cannot perform this (necessary quotation syntax aside) because Array2 is the string "A, B, C" rather than an array of strings {"A", "B", "C"}. So essentially, I want to find some mechanism to be able that ends more or less in, without looping and it's the array of strings delimited that I just cannot seem to crack

    Please Login or Register  to view this content.

+ 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: 12
    Last Post: 01-14-2014, 01:56 PM
  2. [SOLVED] Read last element of Split array and then discard it and resize the array.
    By staggers47 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-28-2012, 06:36 PM
  3. [SOLVED] Returning an array specific to an element of a separate array
    By peterszabla in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-24-2012, 05:30 PM
  4. Array problem: Key words-Variant Array, single-element, type mismatch error
    By davidm in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-09-2005, 01:54 AM
  5. Array problem: Key words-Variant Array, single-element, type mismatch error
    By davidm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2005, 12:30 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