Hi,
Please could you help me to write a macro to filter a spreadsheet. Here is a screengrab of some sample data.
You can see that the data is in blocks, separated by blank rows. Starting from the first row after the header that contains data (13 in this case), I want to evaluate whether Column E contains the value 260 or 255.
If it does contain one of those values, I want to move onto the next row that appears after a blank row and perform the evaluation again. If one of those values isn't present, I want it to hide all the rows until the next blank row. Then, so that I don't end up with huge gaps in the spreadsheet, it will need to take note of its position and hide the blank row as well before looping to perform the evaluation again.
In the screengrab, all I would expect to see after the macro has run is rows 16 and 17. Rows 13, 14 and 15 would be hidden.
I did find this post on hiding rows based on data in columns but I don't know how to deal with the groups of rows and the blank rows.
http://www.mrexcel.com/forum/showthread.php?t=401271
Thanks in advance.
Please could you help me to write a macro to filter a spreadsheet. Here is a screengrab of some sample data.
![extreport.jpg](/board/proxy.php?image=http%3A%2F%2Fdominic.dtrackcomms.com%2Fextreport.jpg&hash=0d1ec35399fdaf5e406448ebb599e42a)
You can see that the data is in blocks, separated by blank rows. Starting from the first row after the header that contains data (13 in this case), I want to evaluate whether Column E contains the value 260 or 255.
If it does contain one of those values, I want to move onto the next row that appears after a blank row and perform the evaluation again. If one of those values isn't present, I want it to hide all the rows until the next blank row. Then, so that I don't end up with huge gaps in the spreadsheet, it will need to take note of its position and hide the blank row as well before looping to perform the evaluation again.
In the screengrab, all I would expect to see after the macro has run is rows 16 and 17. Rows 13, 14 and 15 would be hidden.
I did find this post on hiding rows based on data in columns but I don't know how to deal with the groups of rows and the blank rows.
http://www.mrexcel.com/forum/showthread.php?t=401271
Thanks in advance.