+ Reply to Thread
Results 1 to 5 of 5

Storing Array to Find Replace Value via 2 Dimensional Array

  1. #1
    Registered User
    Join Date
    06-23-2014
    Location
    england
    MS-Off Ver
    2013
    Posts
    78

    Storing Array to Find Replace Value via 2 Dimensional Array

    Hi All,

    Hopefully you can help.

    I have an Array

    Array1 = Array(a,b,c,d)
    Array2 = Array(1,2,3,4)

    the position between the two arrays relate ie a = 1, b = 2 and so on.

    For several Macros i need to find all the values in column A which contain Array1 and replace them to the equivalent within array2. As this action is used within multiple Macors and the Large Array occasional updates i would like to store the Array itself as a Public Function to call upon ie.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This would call within the Macro as follows

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Any help which can be provided would be great!

    Cheers

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Storing Array to Find Replace Value via 2 Dimensional Array

    Maybe this?
    Please Login or Register  to view this content.
    多么想要告诉你 我好喜欢你

  3. #3
    Registered User
    Join Date
    06-23-2014
    Location
    england
    MS-Off Ver
    2013
    Posts
    78

    Re: Storing Array to Find Replace Value via 2 Dimensional Array

    Thanks, the above works however only when all within one Macro.

    Ideally i require the below as a public function to call upon

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Therefore the below would be within each of my individual Macros

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Is this achievable at all?

    Cheers

  4. #4
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Storing Array to Find Replace Value via 2 Dimensional Array

    Hi, you can declare them as public variables, then initialize them with a separate function.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-23-2014
    Location
    england
    MS-Off Ver
    2013
    Posts
    78

    Re: Storing Array to Find Replace Value via 2 Dimensional Array

    Works Perfect! Thank you very much

+ 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. Help converting one-dimensional array to multi-dimensional array
    By puzzlelover22 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-13-2016, 06:48 AM
  2. Parse Data from one dimensional array into a 2 dimensional array.
    By JapanDave in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-30-2016, 07:29 AM
  3. [SOLVED] Convert one dimensional array into two dimensional array
    By mohammed sabr in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-26-2015, 10:34 AM
  4. Replies: 6
    Last Post: 09-25-2013, 10:08 PM
  5. Populate a Single Dimensional Array with two Dim Array (matrix)
    By Benjamin1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-03-2011, 12:49 PM
  6. Mutli-dimensional Array to Single-Dimension Array
    By Blue Aardvark in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-15-2005, 05:05 AM
  7. [SOLVED] Create One-Dimensional Array from Two-Dimensional Array
    By Stratuser in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-23-2005, 05:06 PM

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