+ Reply to Thread
Results 1 to 7 of 7

Need a Fill Down Function For a Multiple-Variable Hierarchy

  1. #1
    Registered User
    Join Date
    05-03-2017
    Location
    los angeles
    MS-Off Ver
    365
    Posts
    25

    Need a Fill Down Function For a Multiple-Variable Hierarchy

    Hi -

    I've asked a version of this question previously, but my new example is more complicated and has to account for a scenario where I am filling in hierarchical categories in a column, but different parts of the hierarchy may be missing in some cases.

    In the attached sheet, Columns A:C are what I already have, Columns D:F are what I am trying to create. You'll see that there is a basic FUNCTION -> SERIES -> GROUP -> Title hierarchy, but in some cases there is "No Group," and in one case there is also "No Series."

    How do I construct a formula that achieves this result. Previously I used a version of this: =IF(A2="**",C2,E1) but I've expanded to a four-level hierarchy and can't figure out how to handle missing steps in the hierarachy, all while creating the asterisks in the D:F columns.
    Attached Files Attached Files

  2. #2
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Need a Fill Down Function For a Multiple-Variable Hierarchy

    Sorry, Steven, I'm not seeing any clear hierarchy, and I have no idea how you populated columns D:F. Are the stars some sort of code? I don't get it...
    Last edited by leelnich; 11-17-2017 at 08:47 PM.
    Clicking the Add Reputation star below helpful posts is a great way to show your appreciation.
    Please mark your threads as SOLVED upon conclusion (Thread Tools above Post # 1). - Lee

  3. #3
    Registered User
    Join Date
    05-03-2017
    Location
    los angeles
    MS-Off Ver
    365
    Posts
    25

    Re: Need a Fill Down Function For a Multiple-Variable Hierarchy

    Sorry leelnich.

    What I mean by hierarchy is that every "Title" is part of a "Group," and every Group is part of a "Series," and every Series is part of a "Function." The asterisks are a sort of code, yes: three for functions, two for series, one for groups, and zero for titles. However, there are a couple series with no group, and one instance of a function without a series.

    I constructed columns D:F manually - I'm trying to figure out what formula will help me create the results in those columns.

  4. #4
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Need a Fill Down Function For a Multiple-Variable Hierarchy

    Ok, a pattern is emerging...

  5. #5
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Need a Fill Down Function For a Multiple-Variable Hierarchy

    Paste these in row 2 and copy down:

    D2 =CHOOSE(LEN($A2)+1,D1,$C2,"*","*")
    E2 =CHOOSE(LEN($A2)+1,E1,E1,$C2,"**")
    F2 =CHOOSE(LEN($A2)+1,F1,F1,F1,$C2)
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    05-03-2017
    Location
    los angeles
    MS-Off Ver
    365
    Posts
    25

    Re: Need a Fill Down Function For a Multiple-Variable Hierarchy

    leelnich! thanks so much, this is great.

    One updated question -

    On the first instance of the hierarchy, what if I wanted it to display the appropriate asterisk from Column A, rather than the text of the category?

    For example, in this sheet, on D4, it says "Agricultural Production Group" - what if I wanted it to say "*"? And instead of E3 saying "Agriculture Series," what if I wanted it to say "**"? And in F2, what if I wanted it to say "*" instead of "Land Function"?

    I've played around with the LEN part of your function and I can't quite make it work - it seems like to get the asterisk result, it has to be static, but obviously to get the subsequent result it needs the "+1" you've added. Any thoughts?

    Thanks again - this is sufficient for my purposes even if you don't have a solution to my additional question.

  7. #7
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Need a Fill Down Function For a Multiple-Variable Hierarchy

    Try this:

    D2 =IF($A2>="*","*",IF($A1="*",$C1,D1))
    E2 =IF($A2>="**","**",IF($A1="**",$C1,E1))
    F2 =IF($A2="***","***",IF($A1="***",$C1,F1))
    Attached Files Attached Files

+ 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. FILL function not working when linking multiple workbooks
    By Joe G Hoover in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-09-2017, 05:31 PM
  2. How do I convert column hierarchy to flat file hierarchy
    By tbucki1 in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 09-21-2016, 09:33 PM
  3. Creating multiple drop box in hierarchy
    By unley in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-05-2016, 04:41 AM
  4. Pull data from hierarchy of multiple dependant lists
    By fordwaters in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 12-05-2014, 11:57 AM
  5. [SOLVED] How to identify the right data row in a variable length hierarchy data set?
    By maartengolf in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-19-2014, 03:39 PM
  6. Formula or VBA to fill down a hierarchy to create a flat file
    By bmb163 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-28-2012, 09:34 AM
  7. [SOLVED] AutoFill Macro for a formula in one column fill-handled to multiple col/[variable] rows
    By kbspence in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-29-2012, 03:47 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