+ Reply to Thread
Results 1 to 4 of 4

[SOLVED] Function to Get Array Count from Cell Reference and Repeat

  1. #1
    Registered User
    Join Date
    01-10-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    [SOLVED] Function to Get Array Count from Cell Reference and Repeat

    I couldn't figure out a better way to titled it :\ Basically I'm trying to create a function that has three parameters -- the cell you want to reference, the delimiter in the reference cell, and the string you want repeated.

    For example in my first cell (A1 for example) I have:

    Strawberry,Kiwi,Orange,Mango,Papaya

    In the adjacent cell (B1 for example) I would type my function =Example(A1,",",'Fruit") and that would return

    Fruit,Fruit,Fruit,Fruit,Fruit.

    Can I create an array by using Split, looping on that array, and then joining them back?
    Last edited by desertshore; 02-05-2015 at 01:49 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,236

    Re: Function to Get Array Count from Cell Reference and Repeat

    Hi desertshore,

    Find attached what I think you want. It has a UDF called Example that takes 3 arguments like you suggest.

    Function looks like this:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Function to Get Array Count from Cell Reference and Repeat

    Use in cell like

    =SplitJoin(A1,",","Fruit")

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-10-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Function to Get Array Count from Cell Reference and Repeat

    Thank you both! I knew I was over thinking it.

+ 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] Modify an IFERROR INDEX array function to LINK a cell to ROW reference
    By paulmacro in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-28-2015, 09:43 AM
  2. [SOLVED] Repeat a formula 5 times before changing cell reference
    By amartin575 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-28-2014, 04:11 PM
  3. [SOLVED] IF function with cell reference array formula?
    By Dwexdwex in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 08-17-2013, 06:15 AM
  4. function to reference all of pivottable data field array
    By andrew in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-22-2006, 02:00 PM
  5. Replies: 1
    Last Post: 08-17-2005, 02:05 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