+ Reply to Thread
Results 1 to 2 of 2

Fill data down rows based on cell value

Hybrid View

  1. #1
    Registered User
    Join Date
    01-09-2014
    Location
    Durham, NC
    MS-Off Ver
    Excel 2003
    Posts
    8

    Fill data down rows based on cell value

    I have data in a table. The first column is the item and the second column indicates how many rows I'd like to fill the data down as indicated below.

    Item / Fill_Rows
    A / 3
    B / 2
    A / 3
    C / 4

    I'd like to put a formula in the "Item" column that can be dragged down to produce the following output.

    Item
    A
    A
    A
    B
    B
    A
    A
    A
    C
    C
    C
    C

    The formula would need to reference the "Fill_Rows" column in the first table to determine how many rows of the "Item" to fill down.

    Thanks!

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2506
    Posts
    13,796

    Re: Fill data down rows based on cell value

    Please try this



    A
    B
    C
    D
    1
    Item
    Fill_Rows
    2
    A
    3
    3
    In C2 and filled down.
    3
    B
    2
    5
    =B2+N(C1)
    4
    A
    3
    8
    5
    C
    4
    12
    6
    7
    8
    A
    In A8 and filled down.
    9
    A
    =IF(ROWS(A$8:A8)>MAX($C$2:$C$5),"",INDEX($A$2:$A$5,MATCH(1,INDEX(--(ROWS(A$8:A8)<=$C$2:$C$5),0),0)))
    10
    A
    11
    B
    12
    B
    13
    A
    14
    A
    15
    A
    16
    C
    17
    C
    18
    C
    19
    C
    20
    Last edited by FlameRetired; 04-07-2019 at 09:42 AM.
    Dave

+ 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. Insert rows based on cell value then auto fill blanks
    By warrenr6 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-02-2017, 05:50 PM
  2. Insert rows based on a cell value and Fill down column A
    By blaxor in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2014, 04:54 AM
  3. Replies: 1
    Last Post: 11-25-2014, 08:35 PM
  4. Delete Columns and rows based on cell fill color
    By JackW in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-02-2014, 01:58 PM
  5. Macro to Fill Specific Rows and Columns with Color Based on Cell Value
    By MSmithson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-04-2011, 09:45 PM
  6. Changing cell fill colour based on date in cell - Multiple rows
    By ExcelNewb2010 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-26-2010, 07:30 AM
  7. Macro to auto fill rows based on one cell value
    By jennieS in forum Excel General
    Replies: 6
    Last Post: 08-18-2010, 03:10 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