Are You Trendy ? (Part 3)

Share

Facebook
Twitter
LinkedIn

So you’ve made it to part 3 of Are You Trendy, well done.

In todays final post of Are You Trendy? we will take a break from the maths and discuss techniques and tools that Excel provides to assist us with Trend Analysis.

We will look at 2 techniques, one built-in to Excel called Charts and another which is a User Defined Function (UDF) I developed.

Both techniques have uses in analysis of trends.

Once again all examples below are found on the Examples Workbook.

Excel Charts

Excel has a number of charting styles some of which have the ability to calculate and display Trend Lines.

The following tables shows which charts Do and Don’t support built-in trendlines.

Supports Trendlines Doesn’t Support Trendlines
Scatter (X Y) Pie
Line Donut
Area Radar
Column Stock
Bar Surface
Bubble

For those charts that don’t support trendlines, this doesn’t stop us, as Excel users, from adding other series or using other techniques to add trendlines to the charts, it just that we have to do the hard work ourselves and not use Excels built-in skills.

For this exercise we will be using a Scatter (X Y) Chart but the techniques apply equally to all charts that support trendlines.

So lets go: First we need some data.

Next add a scatter chart , Select the data and Insert Chart, X Y (Scatter Chart)

Adding a Trend Line to the chart is as simple as selecting the chart and right click on the Series you want to add the Trend Line to, see below.

You can change the trendlines properties to make it stand out as per the above.

Once you add a Trendline a Format Trendline dialog will appear.

This is the main window for setting Trendline properties and format options.

In this post I am not going to be dealing with the Tab Options of Line Color, Line Style, Shadow and Glow and Soft Edge options, as I am sure you can work out what they do and play with them at your leisure.

Trendline Properties

Once you have added a Trendline you can access the Trendlines properties at any time by:

Selecting the chart

Select the Trendline

Right Click and Format Trendline.

How Many Trendlines Can I Have ?

You can add a large number of Trendlines to each Chart Series in Excel by simply selecting the Right Clicking on the Chart Series and select Add Trendline.

Some of the regression types may not be available on second and subsequent regressions.

Trend/Regression Type

The main section of the Format Trendline dialog is the Trend/Regression Type:

This section lists 5 trend types we are familiar with from the Are You Trendy? (Part 2).

For more details on the individual Tren Types refer to Are You Trendy (Part 2).

The default trend type is Linear ( Y = mX + c ).

You can select each type in turn and see the estimated trend.

Exponential

Linear

Logarithmic

Polynomial

This shows the Trendline for a Polynomial Estimate of Power = 2. Excel supports up to Power = 6.

Power

Moving Average

Moving average isn’t a forecasting tool, but is more of a data manipulation tool, which is commonly used for elimination of short term trends or smoothing of the data source. Some industries use Moving Averages to look at buying and selling opportunities by comparing the current price against longer term trends.

It is possible to use moving average data for trend analysis, but this must be first done manually in Excel and then it can be used with the techniques discussed here.

As such we won’t be discussing its use here.

If you are interested in reading more about the use of moving averages have a look at  Moving Average.

Trendline Name

The Trendline Name section by default shows you the Selected Trend Estimation type and your Data Series Name eg: Linear (My Data)

However you can type whatever Name you want by using the custom field:

eg: Huis Fruit Shop Sales Trend

Forecast

The Excel Chart Trendline function allows us the option to project our Trendline a number of periods or X Values into the future or past.

The above will forecast our trend line 50 X axis values past the limits of our data and 10  X axis values prior to the limits of our data and is shown below.

This is a great option to use for 2 reasons.

Firstly you can use this to see where the Trendline will cross the Y axis (X = 0) and is an important check to validate your selected Trendline.

You can see in the example above that the Trendline crosses the axis at -10. If this isn’t correct we can either try another estimation technique or Excel has a tool, which is discussed below, to deal with that.

Secondly, you can use it to look into the future by projecting the Trendline past your data limits.

Misc Parameters

The final 3 parameters

Set Intercept

By default Excel Chart Trendline has used a Const value of True and hence calculates the natural intercept value for the data. If you want to over-ride this with a 0 intercept value Tick the box and select a value

Set Intercept : Not selected

Set Intercept : Selected Value of 10.0

I would always suggest using the Forecast backwards option first to see what the natural intercept is before using this option (Both charts above show the Trendline projected back 10 periods) but the second chart has a Y intercept set manually to 10.

Display Equation on Chart

The Display Equation on Chart options use is self explanatory, it Display the equation to the current Trendline on the current Chart:

The equation is based on the select Trend type.

The equation is also live, in that if you change and selected another Trend Type or the data changes the equation will update, similarly if you select to intercept the Y axis at 0 or another value.

By selecting the Text Box which has the equation the equations Font properties can be changed eg: Font Style, Size, Italic, Bold etc as well as background color.

Display R2 on Chart

This display the R2 value on the chart in the equation Text Box as shown above.

The R2 value is based on the select Trend type.

The R2 value is also live, in that if you change and selected another Trend Type or the data changes the R2 will update, similarly if you select to intercept the Y axis at 0 or another value.

By selecting the Text Box which has the equation the R2 the Font properties can be changed eg: Font Style, Size, Italic, Bold etc as well as background color.

How Can We Look at Values Along a Trend Line?

In Are You Trendy? (Part 2) and in the section above we looked at a number of ways of establishing a Trendline.

So how can I predict values along a Trendline?

There are a few ways and we will discuss 2 of them.

1.       Write an equation in excel

2.       Use my Trendy User Defined function.

Write an Equation in Excel

In the previous section we had a chart shown below:

The equation for the line of best fit is Y=7.8984.e^(0.0256.X) which in Excel cell formula talk is =7.8984*EXP(0.0256*X Cell)

So we can setup a cell or range of cells in excel to show us either intermediate values or future values of X and the corresponding Y values.

The great thing about having an equation is that we can now use this to animate our chart.

I’m not talking about Avatar style animation, but simply adding a tool for the user to interactively select X values and the equation and chart will show us the new Y value. This even allows us to show future values past the end of our data because we are using the equation to our data.

How do we do this?

Refer to Sample Workbook.

Firstly lets add a cell which will contain the X value

E52 = 10

Secondly add a cell which has our equation

E53:  =7.8984*EXP(0.0256*X Cell)

Third add a Scroll Bar Control from the Active X controls on the Developer toolbar and set a few properties

Minimum = 0

Maximum = 300

Linked Cell = E52

Large Change = 10

Fourth add a new series to our chart which will just have a single X and Y value

Series Name = “Our Trend”

X Series = E52

Y Series = E53

You can now interactively move the srcoll bar back and forth and the Chart will show you the new forecast value for our sales in Huis Fruit Shop.

The limitations with the above approach is that it is fixed to the equation you use for your Y value, which is based on your selected choice of Trendline type.

Can we link this technique to the equation from the Trendline ?

With Excel natively, No 🙁 .

TrendY – A User Defined Function for the Analysis of Past, Intermediate & Future Trendline Values

In a post at Chandoo.org user Trevian3969 asked the question “How can I view intermediate values along a Charts trend line?”

The answer was the development of the UDF, TrendY (Trendy).

Trendy was developed to do exactly that, take the equation from a Charts Trendline and evaluate it to determine intermediate, past or future values based on a given X input.

Because the UDF is taking the equation for the trend line it can be used to return a Y value for any X values, prior to, later than or within the supplied or known X Range of the chart.

An Example of the use of Trendy is shown in the attached Workbook

Form:   = TrendY(X Value, [Chart No], [Series No], [Trendline No])

X Value: Is the X Value that you want to know the Y Value of the Trendline

Chart No: Chart No is optional and is the Chart No on the current sheet, Default or omitted = 1

Series No: Series No is optional and is the Series No on the chart, Default or omitted = 1. The series No is the number shown at the end of the Formula Bar when a series is selected

eg: =SERIES(“My Data”,Sheet1!$B$2:$B$41,Sheet1!$C$2:$C$41,1)

Trendline No: Trendline No is optional and is the Trendline No of the Trendline you wish to track. Default or omitted = 1.

[Option Parameters, Default = 1]

Eg:    = TrendY(20)  will place the value of X=20 into the Trendline Equation of the Trendline of Chart 1 Series 1 Trendline 1

= TrendY(40,1,3,2)  will place the value of X=20 into the Trendline Equation of the Trendline of Chart 1 Series 3 Trendline 2

=TrendY(B43,,3) will place the value of cell B43 into the Trendline Equation of the Trendline of Chart 1 Series 3 Trendline 1. Chart and Trendline both default to 1 as they are omitted.

The function works with all the Trendline types and variants of those, except the Moving Average.

To use the Trendy UDF copy the following code to a VBA Module or alternatively import the Txt File as a new Module

Trendy Code Module

The code is also available in the Example Workbook with a fully working m0del.

If you don’t have the Trendlines equation shown it will do that for you and it ignores the R^2 function if shown.

The Trendlines equation box is actually where the function gets the equation from in the first place.

Then on a worksheet simply use then =Trendy(X Value) as described above.

Trendy has only been tested on Excel 2007 and 2010, use on other versions at your own risk.

Limitations

The Trendy UDF is limited to use the available precision of the parameters, for each equation, as displayed in the Equation Text Box on the Chart.

In some cases especially when multiplying by powers of large numbers and especially in the Polynomial equations, there may be a large discrepancy between the calculated value by Trendy and the displayed value by the Trendline on the Chart. In these cases the Trendline is correct. This will show on the chart as the Plot Y value of Trendy not being on the Excel calculated Trendline.

Trendy has 2 constants at the top of the UDF that are used for the calculation of Intermediate Equations. These are equations that the user doesn’t see but are done at a much higher level of precision to avoid these errors. These constants are:

Const DataLabelNoFormat = “#,##0.0000”
Const PolynomialNoFormat = “#,##0.000000000000”

If you have rounding errors the easiest way to fix them is to increase the number of decimals by increasing the number of zeroes after the decimal in the appropriate line, remembering that Excel only carries 15 decimal places anyway and Trendy is already using 12 for Polynomial Trends already.

Trendy returns the displayed equations to 4 decimals after the intermediate calculations in any case.

Further Readings

Are You Trendy (Part 1)

Are You Trendy (Part 2)

All Examples from the Are You Trendy? Series in one Workbook

Final

I hope you have enjoyed this 3 part series on Trend Analysis and Forecasting using Excel.

It has been put together to Introduce you to, and whet your appetite to, some of the functions, tools and techniques that you may not have had a lot of exposure to in the area of Trend Analysis and Forecasting using Excel.

I’d like to thank Chandoo for the opportunity to look after Chandoo.org for the past week and the opportunity to put the 4 posts up.

I will now hand Chandoo back the keys to the blog, hopefully without any dents.

Let me know what you thought of the series in the comments below:

Keep us informed on How you go with real data once you start applying some of these techniques.

Hui…

ps: I still don’t know if Trevian3969 was happy with my response to his post as he never responded ?

Facebook
Twitter
LinkedIn

Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my storyFREE Excel tips book

Overall I learned a lot and I thought you did a great job of explaining how to do things. This will definitely elevate my reporting in the future.
Rebekah S
Reporting Analyst
Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It's all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

59 Responses to “Robust Dynamic (Cascading) Dropdowns Without VBA”

  1. Gary says:

    downloaded workbook doesn't work for me. it's always missing the first selection.
    so, If I choose fruit, apples is not in the dropdown. if I choose vegetables, beets is not in the dropdown

  2. @Gary, you are right, I try to anticipate the reply of Jeff.
    Here’s the right formula, enter into the Name Manager while cell B8 was selected:

    =IF(ISBLANK(C8),IF(DataEntry[#Headers] B:B = DataEntry[[#Headers],[Main Category]],OFFSET(ValidationLists[[#All],[Main Categories]],1,,COUNTA(ValidationLists[Meat])),OFFSET(ValidationLists,,MATCH(A8, ValidationLists[#Headers],0)-1,COUNTA(OFFSET(ValidationLists,,MATCH(A8, ValidationLists[#Headers],0)-1,,1))-1,1)))

  3. UFFF ... i'm sorry ... forget my previous comment 🙁
    Here’s the right formula, enter into the Name Manager while cell B8 was selected:
    =IF(ISBLANK(C8),IF(DataEntry[#Headers] B:B = DataEntry[[#Headers],[Main Category]],OFFSET(ValidationLists[[#All],[Main Categories]],1,,COUNTA(ValidationLists[Meat])),OFFSET(ValidationLists,,MATCH(A8, ValidationLists[#Headers],0)-1,COUNTA(OFFSET(ValidationLists,,MATCH(A8, ValidationLists[#Headers],0)-1,,1)),1)))

    the errors were due to the fact that ValidationLists does not include the header (as I had initially interpreted)

  4. Elias says:

    Great formula as an always Roberto. However, I think it still need some VBA to clean the subcategory selection if the user delete the previous category.

    Regards

    • Ciao Elias! the formula was born from a discussion with Jeff, everyone added something then he wrote this post and he explained the formula ... he gave all the credit to me ... but the merit is more his ... I've only made a mess with these Excel Tables (I'm sorry) 🙂
      anyway thanks

  5. Jeff Weir says:

    Gary: Thanks for the heads up. Have fixed post and sample file.

    Elias: No VBA necessary as users CANNOT delete upstream categories without FIRST manually cleaning out downstream categories. Give the sample file a spin.

    • Elias says:

      Hi Jeff,

      Open the file->go to B8 and press the delete key. Do I missing something?
      Also, the new file’s link is giving and error.

      Regards

      • Jeff Weir says:

        No, it's me that's missing something...I misunderstood what you were saying. So yes, you'd need VBA to do that, along the lines per my previous post. But this is still a great non-VBA solution, apart from that.

        Link fixed.

        Cheer Elias.

  6. Kuldeep J says:

    Great....i was looking something like this in past but end up with only VBA solutions which i really did not liked them because if anyone unknowingly chnage the upper LOV, All the sub selection get vanished and if the person do not know what those LOV, He/She can only hit his head.

  7. LeonK says:

    What a fantastic solution. I'm currently replacing VBA routines with non-VBA ones and this formula has become a major part of my re-modelling. Thank you so much for debating, creating and sharing this formula.

    LeonK

  8. Jeff Weir says:

    Kuldeep and LeonK: Thanks for you kind comments. Without comments like yours, I tend to think that noone finds this stuff useful.

  9. Oxidised says:

    Great solution! shame I needed it 6 months ago, but I'm sure i'll find another use for it soon!

    Certainly do find it useful, keep the awesome posts coming!

  10. Doug Glancy says:

    Nice work, Jeff and Roberto. The VBA-free cascading data validation is a worthy goal.

    At my previous job I regularly sent out Excel surveys to dozens of recipients, and of course couldn't hazard the maintenance nightmare of VBA. I came up with a version of dependent dropdowns that wasn't as self-correcting as this, but uses Conditional Formatting to alert the user, and ultimately, the analyst, that something is amiss. If anybody's interested it's at http://yoursumbuddy.com/user-friendly-survey-without-vba/.

  11. […] Weir explains Robert Mensa’s technique for creating robust dynamic drop downs, without VBA. Just remember, the best we can do is build things that are idiot resistant, not idiot […]

  12. Pablo says:

    Thanks Jeff and Roberto, this is exactly what I was looking for. The timing it's like a miracle! 🙂

    I noticed that the validation is not consistent, in some cells I can type anything I want, but in others the validation rule works. I just copied the cell from the one that was working to the rest and now all are fine. I hope I didn't mess up anything by doing that.
    Thanks again,
    Pablo

  13. […] Howdy folk. Jeff Weir here. You might remember me from shows such as Handle volatile functions like they are dynamite, Did Jeff just Chart, and Robust Dynamic (Cascading) Dropdowns Without VBA. […]

  14. Leonard says:

    Guys, does this work with subcategories beyond 3, per the example? I have a flow chart decision tree with 6 subcategories. My customers are basic users who don't want to read my guidelines or decision tree. I thought dynamic dependent drop downs the best option for this situation. However, I can't seem to find anything on the web that shows beyond 3 categories. If anyone can help show how it could work with the learning/example that Jeff published above, I would be grateful...or if there are better options then drop downs...

    • Jeff Weir says:

      Leonard - yes it can. As per the original article: Like Roger’s approach, Roberto’s approach can handle any number of cascading levels, provided all the category names are unique. All you need to do is simply add the new subcategories to the right hand side of the validations table.

      • Leonard says:

        Thanks Jeff!

        Even though I am basic beginner, I managed to emulate and then modify. Maybe it say somewhere, but I discovered that if your last column in the validation table isn't filled in as far as the 1st column, then you won't get the full first drop down list. I basically created an extra end column that I filled in with bogus numbers so it would work.

        Thanks again!

  15. Enzo says:

    I just implemented this mechanism and it works perfectly. When I close the file and try to open it again, it just crashes Excel, and the file become useless.
    Tested in two different machines and got the same result.
    Anyone with the same problem?
    Tks
    Enzo

  16. Gigi says:

    Hey,

    I did this equation on a template and it worked out well. I set up three different sections with no problem. A few months later when I tried to add two more sections to a different tab, it will not work. Well, at first it worked but then out of the blue the formula is not working. But only for that section. This is what I am typing in with the proper adjustments for the cell I am entering. Also, not sure if this is a part of the problem, I am using macros to dynamically rebuild the ValidationListsD table in the formula.

    =IF(ISBLANK('Budget Details'!H11),IF(DataEntryD1[#Headers] 'Budget Details'!G:G = DataEntryD1[[#Headers],[SC Account Name]],OFFSET(ValidationListsD[[#All],[SC Account Name]],1,,COUNTA(ValidationListsD[SC Account Name])),OFFSET(ValidationListsD,,MATCH('Budget Details'!F11,ValidationListsD[#Headers],0)-1,COUNTA(OFFSET(ValidationListsD,,MATCH(‘Budget Details’!F11,ValidationListsD[#Headers],0)-1,,1)),1)))

  17. Simon Williams says:

    Hi -
    Thanks for the example - something I could never have done myself 🙂

  18. Walter Rizzoli says:

    Fine article and excellent solution for cascading validation lists. Once I found it I couldn't resist trying it. After a while, then, i bumped into an apparently unsolvable problem: when I try copying the sheet which contains DataEntry table, the validation list wouldn't work. I have the ValidationLists in a different sheet.
    Of course, copying the worksheet forces excel to copy the ValName range which remains with the same name but scoped to the new sheet instead of the workbook. The DataEntry table becomes DataEntry2 instead. I thought the problem was that ValName scoped to workbook in the first place, so that having 2 different range named the same, one being scoped to the workbook was the issue. So I decided to change the scope of ValName to the worksheet before copying. The result was the same: validation lists do not appear on the new sheet, while still working fine on the original one.
    Is there anything I am missing or is just that the operation doesn't have an easy solution (meaning I need to set up the whole thing everytime a copy the sheet)?

  19. Cmt says:

    Hi Guys! try this..
    Let us assume you have the main dropdown in cell A1 and its dependent dropdown in cell B1. Also, let us assume that the name of your main validation list is "list1", which means that under validation criteria for cell A1, you Allow List and in source you type"=list1". So, instead of "=list1", try this:
    Under validation criteria for cell A1, Allow - List. In Source, type the following formula...
    =IF(B1"","",list1)
    THAT IS IT! So long as cell B1 is not empty you will not be able to input any value in cell A1.

    • Jeff Weir says:

      Cmt...that works fine for two level dropdowns, where you have set up named ranges ahead of time. But my approach can handle any number of cascading levels (provided all the category names are unique) without having to set up individual named ranges. All you need to do is simply add subcategories to the right hand side of the validations table (Table1). There's more on this in the original article I link to at the top.

  20. Dzordzan says:

    That is AWESOME!!! I am not VBA yet but needed to impress by boss 😀 AND I DID!!! I did impress myself though as well lol! Biggest thanks to you, Chandoo!!! You rock!

  21. Discoblade says:

    This is exactly what I was looking for, except for one issue, I would likre my data input to be on a different sheet to the source table, and I can't seem to make it work...help?

  22. Mangirish Nadkarni says:

    I have tried the formula. My data input is on Opportunity Data sheet from K3:M9999 and my Validation Lists are on DB Sheet from B37:W55. I have "First_Header", "ProductData" and "ValidationLists" in the Name Manager. I tried the formula as: =IF(ISBLANK(Opportunity_Data!L3),IF(ProductData[#Headers] DB!B:B=ProductData[[#Headers],[Customer Billing Plant]],OFFSET(ValidationLists[[#All],[Customer Billing Plant]],1,,COUNTA(ValidationLists[Customer Billing Plant])),OFFSET(ValidationLists,0,MATCH(DB!A36, ValidationLists[#Headers],0)-1,COUNTA(OFFSET(ValidationLists,,MATCH(Sheet1!A36, ValidationLists[#Headers],0)-1,,1)),1))). I am continuously getting the error message regarding incorrect formula with the ValidationLists[[#All] highlighted. Can you please help me?

  23. Prajay Kumar says:

    One more simplest way is to use INDIRECT function.

  24. Jeff Weir says:

    Yes, you can use INDIRECT. But you have to set up a seperate named range for every possible combination, and you can't use spaces (meaning in the example above you would have to use Ozark_Beauty instead of Ozark Beauty). So if you have more than a couple of levels of cascading dropdowns, the INDIRECT approach soon becomes unwieldy.

    Whereas my approach can handle any number of cascading levels (provided all the category names are unique) without having to set up individual named ranges. All you need to do is simply add subcategories to the right hand side of the validations table (Table1). There's more on this in the original article I link to at the top.

  25. Tracy Ormand says:

    I'm working on adapting this to my form. I'm just getting into using VBA and advanced formulas, literally like three days ago! I was wondering if this will work with my project. I have a very simple form that I created using one downstream dropdown to capture a group and subgroup. I only have the one table where my source data is pulled from. There are no headers in my data entry (form) area either. Just want to make sure its possible. I'm hoping to understand this better once my Vyvanse kicks in!

    Kind regards

    • Jeff Weir says:

      Yes, this should work. Setting it up can be a bit complicated, so if you get stuck, perhaps the best way to proceed is to download the example, and change it to suit your needs.

  26. Jim says:

    Hi Chandoo,
    Your formulas have worked wonders for me, however after finally being able to apply this "Robust-dynamic-cascading-dropdowns-without-vba", it seems I could not get the dropdowns to work if I duplicate the worksheet and rename. When I pull up the Name Manager, it seems the originally created table and Name Ranges are scoped to Workbook, and new Names exist scoped to specific Worksheet.

    Not sure if I make any sense, but in simple terms, I duplicated sheet 1, rename to sheet 2, click on the same cell with data validation, no drop-down appears.

    Any idea?

    • Jeff Weir says:

      Hi Jim. I'm the author of this guest post, not Chandoo. You'll simply have to create new names that don't conflict with the old.

  27. Jim says:

    Hi Jeff, sorry I didn’t notice... anyway, thanks for the reply, just realised the sheet names and formulas will then have to match accordingly, it works fantastic now! A thousand sincere thanks!!! 😉

  28. Michael says:

    Hi Jeff,

    Thanks for this post, this was very helpful. I am trying to tweak this formula to accommodate a similar dynamic drop-down structure, but in a different format. My DataEntry table must be formatted a certain way to meet upload requirements.

    In my case on the DataEntry table, my "Main Category' drop downs are the table headers (So picture Fruits, Vegetables, and Other Stuff, in B7:D7) and my dependent sub-category drop-downs (only using 1) are in the rows directly underneath (ex. Apples, Beets, Bread as selections in B8:D11)

    My Validation table has my Main Category selections as column headers with all the sub-category values listed underneath. (I hadnt considered an Initial List since I only have 1 dependent drop-down list)

    I can change the validation table in any way I want but the DataEntry table must stay in this format. Is there a way to rearrange the formula to accommodate this while maintaining functionality?

    Thanks!
    Michael

    • Jeff Weir says:

      I'm afraid not, Michael. You'll have to research for a different approach.

    • Chandoo says:

      In this case, you can use the example demonstrated here:

      https://chandoo.org/wp/cascading-drop-down/

      • Michael says:

        Hi Chandoo,

        Thanks for this, unfortunately I cannot use this as I will need to copy the validation over to multiple columns to the right, and also have the dependent drop down validation copied down to multiple rows. So I wont be able to have the IFERROR formula that displays the red X next to my drop-downs, nor can I put it underneath. Similarly I will need to format my validation values as a table so I can add new items to each drop-down as I please.

        Based on this criteria, is VBA my only option here?

  29. Leonardo says:

    Hi Chandoo,

    I use Excel for Mac 2016, so when I try to paste my version of the suggested formula the range of cells box truncates it to 255 characters max (my formula has 455 characters).

    Is there a way to get around this situation?

    I tried splitting it up in two and using CONCATENATE to combine it together but it didn't work. Maybe I'm doing it or there's a more clever way to circumvent this limitation...

  30. Barry says:

    Hi! This solution is perfect for me! I am trying to use Cascading Drop-downs on a protected sheet and don't want to get into VBA to get around that. I would only need to adapt the Headings and Category names.

    I can do this easily and it works perfectly on the worksheet I downloaded from you.

    However - I think I am having the same trouble as Leonardo above - When I try to copy the sheet into my existing workbook, it fails. It says I am missing a parenthesis. I am also using Excel for Mac 2016. But I don't understand why it works on the worksheet I downloaded, but not when trying to integrate it into a new workbook. Thanks for any help!

  31. Barry says:

    Actually I figured it out - if I "copied" your worksheet into mine, the problems occurred. If I "moved" the worksheet into mine, it worked perfectly, thanks again for providing this innovative solution, now I can use these lists on a protected workbook with no VBA to work around!

  32. Pierre says:

    Hi everyone,
    First of all, thank you for this article, it is really insightful.
    I have a question regarding this topic tho.
    My question is "How many levels of dynamic (cascading) dropdowns can you construct ?".
    In order terms, would it be possible to add a 4th level with illegal characters in the example above ?
    I tried to research that really hard but could not find anything. Any help is welcome.
    Thank you,
    Pierre

  33. Thomas says:

    Hi, I am looking for a formula where the cell content changes from selecting the options in a dropdown. For example: when I select week as an option in the dropdown then my dashboard will give me report week wise information. From Cell A5 to A15 the weeks should be reflecting and based on that weeks the other column cells should give the info. Likewise when I select the option as Month then the same cells A5 to A15 should show the months and based on the month the other column cells will give the report. And other this is, only the available week or month should reflect in the A5 to A15 Cells from the dump.

  34. Miguel says:

    I need help!
    I have 2 columns one with date which can repeat and another with date that vary along the day as multiple tests are executed during the day. I need a cascading dropdown, than upon selection of the date, user's can choose the time at which the report was executed to look at the data.
    my 2 tables look like this:
    Date Hour
    20/10/2020 13:45
    20/10/2020 15:34
    07/10/2020 20:00
    09/10/2020 20:45
    09/10/2020 21:45

    How would the formulas look for a scenario where I don't have and categories listed on the top row?

Leave a Reply