+ Reply to Thread
Results 1 to 4 of 4

How to populate fields from an array

  1. #1
    Registered User
    Join Date
    06-26-2006
    Posts
    44

    How to populate fields from an array

    I have an array set up by a column and a header like this:

    1 2 3 4
    A a1 a2 a3 a4
    B b1 b2 b3 b4
    C c1 c2 c3 c4...

    I need to populate label sets by fields generated by the array elements like:

    5 of a1, 7 of a2, 8 of a3, 16 of a4.
    6 of b1, 2 of b2, 10 of a3, 0 of a4...

    How can I do this?

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: How to populate fields from an array

    Where does this array exist - a Word table, and Excel workbook, something else? How is your code supposed to find the source and/or target?

    And where do the 5, 6, 7, etc. come from?

    Also, when you say:
    I need to populate label sets by fields generated by the array elements like:

    5 of a1
    is that a literal "5 of a1" in one cell (label), or "a1" in 5 cells? Is the output to be produced across-then down, or down then across?

    You need to give a lot more detail...
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Registered User
    Join Date
    06-26-2006
    Posts
    44
    Quote Originally Posted by macropod View Post
    Where does this array exist - a Word table, and Excel workbook, something else? How is your code supposed to find the source and/or target?
    I'm not fussy, any of those methods would work. An Excel table seems like it'd be easiest.

    I'm on mobile, so I'll forgo marking with quote tags.
    And where do the 5, 6, 7, etc. come from?
    Placeholder values meant to illustrate what I'm talking about.

    Also, when you say:

    is that a literal "5 of a1" in one cell (label), or "a1" in 5 cells? Is the output to be produced across-then down, or down then across?
    No, that would go in a field in a label, there would also be some other text, but it's all the same and so a trivial problem to solve.
    Left to right then down is the standard method of filling, but in not picky if someone were to help me find an alternate method of completion that involved down then across.

  4. #4
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: How to populate fields from an array

    Your answer is as clear as mud. Perhaps you should consider using a mailmerge - with the data suitably laid out in the source file, of course.

+ 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] Populate one array from another array and print new array as a range
    By Kaden265 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-07-2014, 07:52 AM
  2. Replies: 6
    Last Post: 09-25-2013, 10:08 PM
  3. Loop new messages containing a table, populate a dynamic array, paste array to Excel
    By laripa in forum Outlook Programming / VBA / Macros
    Replies: 1
    Last Post: 05-19-2013, 07:20 AM
  4. [SOLVED] Populate Listbox with all rows of a dynamic array where elements of a single array match.
    By Tayque_J_Holmes in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 08-07-2012, 04:54 AM
  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. Replies: 3
    Last Post: 08-11-2009, 09:45 AM
  7. [SOLVED] populate the fields
    By Mir Khan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-08-2006, 06:35 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