Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide columns and rows delete automatically Excel Worksheet Functions 2 September 25th 07 12:49 AM
Hide / Unhide columns and rows PaulM Excel Discussion (Misc queries) 8 September 6th 07 12:14 AM
Turning rows of equal number of columns into 1 continuous row chimerical Excel Worksheet Functions 1 December 7th 06 09:45 PM
set number of rows equal in mutiple columns speary Excel Discussion (Misc queries) 5 July 8th 05 12:27 AM
Hide rows or columns using + - buttons [email protected] Excel Discussion (Misc queries) 2 July 6th 05 02:56 PM


All times are GMT +1. The time now is 02:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"