Fishboy
Well-known Member
- Joined
- Feb 13, 2015
- Messages
- 4,267
Hi all,
I am working on an Excel 2010 workbook and am looking to create a worksheet.change event to hide specific rows if they are blank, or show them if they are not.
I have a number of tables which use formulas to populate cells based on values elsewhere in the workbook, which means sometimes rows have data in and sometimes not. I am looking to have the worksheet.change code look at specific cells (defined in the code) and if the referenced cell is blank hide the row.
For example:
I want to look at C35:C43, and for every blank cell the rest of that row needs to hide.
Changes elsewhere in the workbook might suddenly populate a previously blank cell in range C35:C43, at which point the corresponding row needs to unhide.
I don't know if I can use the above range to achieve this, or whether there needs to be a specific line of code for each row.
Can anyone offer any insight at all please?
I am working on an Excel 2010 workbook and am looking to create a worksheet.change event to hide specific rows if they are blank, or show them if they are not.
I have a number of tables which use formulas to populate cells based on values elsewhere in the workbook, which means sometimes rows have data in and sometimes not. I am looking to have the worksheet.change code look at specific cells (defined in the code) and if the referenced cell is blank hide the row.
For example:
I want to look at C35:C43, and for every blank cell the rest of that row needs to hide.
Changes elsewhere in the workbook might suddenly populate a previously blank cell in range C35:C43, at which point the corresponding row needs to unhide.
I don't know if I can use the above range to achieve this, or whether there needs to be a specific line of code for each row.
Can anyone offer any insight at all please?