Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Hide rows when specified columns equal zero
I have a spreadsheet which is an accounting balance sheet. With the exception
of the top 3 rows and column A all the data in the sheet is looked up from a seperate piece of software (it uses the data in column A and Rows 1-3 to look up the data). The data is within B7:F123. I would like to write a macro to hide all rows where column A is not blank but columns C, D, E, F all equal zero or are blank. It is important that if A is blank the line should never be hidden. The rows that are blank will change overtime and so each time the macro is run it needs to unhide rows that no longer fulfil the criteria and hide any that do. Any help would be much appreciated. If anyone is writing a response please be warned I am a novice with VB. Many Thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Hide rows when specified columns equal zero
Autofiltering on a helper col would provide the core functionality that you
seek Put a label in G6, eg: Key Place in G7: =IF(AND(A7<"",SUMPRODUCT(((C7:F7="")+(C7:F7=0)))) ,"","x") Copy G7 down to cover the max expected extent of data, say down to G200? Select G6:G200, apply autofilter, then just choose "x" from the droplist in G6. That would give you the exact results that you seek, ie hiding all data rows whe .. where column A is not blank but columns C, D, E, F all equal zero or are blank -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Han123" wrote: I have a spreadsheet which is an accounting balance sheet. With the exception of the top 3 rows and column A all the data in the sheet is looked up from a seperate piece of software (it uses the data in column A and Rows 1-3 to look up the data). The data is within B7:F123. I would like to write a macro to hide all rows where column A is not blank but columns C, D, E, F all equal zero or are blank. It is important that if A is blank the line should never be hidden. The rows that are blank will change overtime and so each time the macro is run it needs to unhide rows that no longer fulfil the criteria and hide any that do. Any help would be much appreciated. If anyone is writing a response please be warned I am a novice with VB. Many Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hide columns and rows | Excel Worksheet Functions | |||
Hide / Unhide columns and rows | Excel Discussion (Misc queries) | |||
Turning rows of equal number of columns into 1 continuous row | Excel Worksheet Functions | |||
set number of rows equal in mutiple columns | Excel Discussion (Misc queries) | |||
Hide rows or columns using + - buttons | Excel Discussion (Misc queries) |