Posts by chaoscreater

    Thanks, I'll give it a try at work tomorrow.


    Just for my learning purposeS, could you explain what your code does PLEASE? I sort of get parts of it. I think you're trying to split the symbols ',' and ';' in order to process the 2 different ranges from the 2 different sheets separately. I kinda get the hidden = 1 and 0, which is to hide or unhide the rows. But I don't quite get the rest and my coding knowledge and skills is just rubbish......

    Sorry, but that's not a good solution for me. Your code assumes that the range is not going to change and is static. You've essentially hardcoded the range into the solution. The code I shared allows you to define a range and this can be any range from any sheet. This makes it flexible and is what I need. All I'm looking for here is to add multiple ranges from multiple sheets into the inputbox. At the moment, I can only feed just one range into it.

    [xpost][/xpost]

    Hi all,


    I'm a complete noob when it comes to VBA scripts, I've never used it before and I'm not a programmer at all. I found a VBA script online and I don't know enough to modify it to suit my needs.


    The script has 2 functions - HideRows and ShowRows. When you run them, you are asked to specify a range. For example, I can provide the following range:

    'Sheet 1'!H7:H24


    It will then look at the cells at H7~H24 in Sheet 1 and hide or unhide the row(s), depending on whether the cell value is a 0 or not.


    What I'm trying to do is to provide multiple ranges from multiple sheets. E.g:

    'Sheet 1'!H7:H24

    'Sheet 2'!D5:D19


    The problem is that the VBA script seems to only allow one range at a time and I need to modify this to allow multiple ranges.


    For reference, I have attached a test Excel spreadsheet for you to play around with.