Results 1 to 5 of 5

Repeat Each Value From Column A X Times Based on Another Count

Threaded View

  1. #1
    Forum Contributor
    Join Date
    05-24-2012
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2007
    Posts
    113

    Repeat Each Value From Column A X Times Based on Another Count

    I would really appreciate some help in trying to figure this out.

    I have a spreadsheet that presently contains 2 columns of data.
    Column A contains one list of unique numbers (that can range from 1 to 10,000)
    Column B contains a group value for those numbers (smaller range of 1 to 100)

    I am looking for a way to repeat each value in Column A based on the number of times their corresponding Col B values appear.
    The results could appear in Col C.

    A | B
    1 | 10
    2 | 10
    3 | 10
    4 | 20
    5 | 20
    6 | 30
    7 | 30
    8 | 30
    9 | 30

    For example, in the table above:
    The value 1 should appear 3 times in Col C (since its associated with the value 10, which appears 3 times)
    The value 2 should appear 3 times in Col C (since its associated with the value 10, which appears 3 times)
    The value 3 should appear 3 times in Col C as well (since its associated with the value 10, which appears 3 times)

    Likewise, the value 4 should appear 2 times in Col C (since its associated with the value 20, which appears 2 times)
    Similarly, the value 8 should appear 4 times in Col C (since its associated with the value 30, which appears 4 times)

    Of course I've left out some of the other numbers in Col A, but I hope this makes sense.

    As you can imagine, these value would get dumped into Col C and the list would be much longer than what appears in either cols A or B as the values in Col A should repeat based on count of times their associated Col B values appear.




    I've also attached a spreadsheet which illustrates the above if it helps!

    Thanks in advance all!
    Attached Files Attached Files
    Last edited by hamidxa; 07-30-2015 at 10:43 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 8
    Last Post: 09-20-2013, 08:12 AM
  2. [SOLVED] Repeat text 3 times down column
    By Kellypeterson in forum Excel General
    Replies: 13
    Last Post: 09-05-2013, 04:33 AM
  3. Repeat a formula a finite number of times in a column
    By alsers in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-05-2013, 11:18 AM
  4. Replies: 1
    Last Post: 04-04-2013, 10:53 AM
  5. Replies: 1
    Last Post: 10-04-2012, 01:53 PM
  6. [SOLVED] Count repeat numbers in column B based on a condition from Column Al
    By helpbitte in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-24-2012, 10:11 AM
  7. How to repeat a macro x number of times based on a value in a cell
    By gypsyhotelier in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-19-2011, 05:11 PM
  8. Repeat a cell value in another column X number of times
    By art1234 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-31-2011, 02:36 PM

Tags for this Thread

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