+ Reply to Thread
Results 1 to 9 of 9

Reference expanding range to autopopulate multiple rows

  1. #1
    Registered User
    Join Date
    12-12-2017
    Location
    California
    MS-Off Ver
    2010
    Posts
    5

    Reference expanding range to autopopulate multiple rows

    Hi - I am trying to find a solution when a user inserts a new row in a list, that will be referenced to automatically populate multiple rows in a separate list. The part on the right should autopopulate as users add additional rows on the left (e.g. asset numbers). Additionally, the asset attribute and asset value are repeating and the same for each new asset number. Any thoughts?

    Excel Prob.png

    (This is my first question so hopefully I'm doing it right! Thanks for your understanding and patience!)

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Reference expanding range to autopopulate multiple rows

    Hello and welcome to the forum.

    Column D can be populated with this:

    D2 =IFERROR(1/(1/INDEX(A$2:A$1000,ROUNDUP(ROWS(A$1:A1)/3,0))),"")

    Where do the values in columns E and F come from?

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Reference expanding range to autopopulate multiple rows

    I see now, they are just repeating.

    Try these:

    D2 =IFERROR(1/(1/INDEX(A$2:A$1000,ROUNDUP(ROWS(A$1:A1)/3,0))),"")

    E2 =IF(D2="","",CHOOSE(MOD(ROWS($1:1)-1,3)+1,"Blue","Big","Cold"))

    F2 =IF(D2="","",CHOOSE(MOD(ROWS($1:1)-1,3)+1,45,20,5))

    Drag all of the formulas down as far as needed.

  4. #4
    Registered User
    Join Date
    12-12-2017
    Location
    California
    MS-Off Ver
    2010
    Posts
    5

    Re: Reference expanding range to autopopulate multiple rows

    Wow, thank you so much.

    The values in Column E & F are actually being referenced from a separate spreadsheet. Would that also be possible to do?

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Reference expanding range to autopopulate multiple rows

    You're welcome. Thanks for the rep!

    Sure, change the hard-coded values to the cell references that the values are in.

    For example, if Blue, Big, and Cold are in Z1, Z2, and Z3, the formula in E2 can be changed to this:

    =IF(D2="","",CHOOSE(MOD(ROWS($1:1)-1,3)+1,Z1,Z2,Z3))

  6. #6
    Registered User
    Join Date
    12-12-2017
    Location
    California
    MS-Off Ver
    2010
    Posts
    5

    Re: Reference expanding range to autopopulate multiple rows

    Thank you! So simple and yet I struggled all morning with it.

  7. #7
    Registered User
    Join Date
    12-12-2017
    Location
    California
    MS-Off Ver
    2010
    Posts
    5

    Re: Reference expanding range to autopopulate multiple rows

    Okay, I have just discovered that not all attributes will be the same. I could be wrong, but would an INDEX/MATCH function work better for this approach?

    Screen Shot 2017-12-12 at 16.16.43.png

  8. #8
    Registered User
    Join Date
    12-12-2017
    Location
    California
    MS-Off Ver
    2010
    Posts
    5

    Re: Reference expanding range to autopopulate multiple rows

    Think I got it, I replaced the specific cell number with the column range, e.g. C:C, D:D, E:E.

    This actually doesn't work...
    Last edited by swilliams658; 12-12-2017 at 09:05 PM.

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Reference expanding range to autopopulate multiple rows

    The part on the right should autopopulate as users add additional rows on the left (e.g. asset numbers).
    In this proposal I have over sized the ranges as 63falcondude suggests in post #2. An alternatives might be dynamic named ranges or a Table.


    A
    B
    C
    D
    E
    F
    G
    H
    I
    1
    Asset Number
    Color Attribute
    Size Attribute
    Warmth Attribute
    Asset Number
    Asset Attribute
    2
    1
    Blue
    Big
    Cold
    1
    Blue
    In G2: =IF(ROWS($2:2)>3*COUNT($A$2:$A$1000),"",INDEX($A$2:$A$1000,CEILING(ROWS($2:2)/COLUMNS($C:$E),1)))
    3
    2
    Red
    Small
    Hot
    1
    Big
    In H2: =IF(G2="","",INDEX(INDEX($C$2:$E$1000,MATCH(G2,$A$2:$A$1000,0),),COUNTIF($G$2:G2,G2)))
    4
    3
    Blue
    Small
    Hot
    1
    Cold
    5
    4
    Red
    Big
    Hot
    2
    Red
    6
    5
    Purple
    Medium
    Ice
    2
    Small
    7
    2
    Hot
    8
    3
    Blue
    9
    3
    Small
    10
    3
    Hot
    11
    4
    Red
    12
    4
    Big
    13
    4
    Hot
    14
    5
    Purple
    15
    5
    Medium
    16
    5
    Ice
    Last edited by FlameRetired; 12-13-2017 at 01:30 AM. Reason: Edited mistake in a formula
    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. [SOLVED] How to reference an expanding range?
    By Carson Dyle in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-09-2016, 08:12 PM
  2. [SOLVED] Autopopulate macro, needs to searrch for appropriate section to autopopulate
    By Butcher1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-09-2015, 09:11 AM
  3. Expanding a range across multiple sheets
    By Kym-B in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-16-2014, 01:00 PM
  4. Autopopulate rows based on contingencies in multiple columns
    By sir stoffer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-17-2013, 09:29 AM
  5. Expanding Cells - Click on Reference
    By curtjer in forum Excel General
    Replies: 1
    Last Post: 04-06-2012, 10:37 PM
  6. Excel 2007 : Expanding columns with sheet-reference
    By halbooth in forum Excel General
    Replies: 0
    Last Post: 10-31-2011, 06:45 PM
  7. Expanding a complex range reference
    By bob lad in forum Excel General
    Replies: 5
    Last Post: 03-05-2010, 12:01 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