Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Is it possible in Excel to have the result of a formula hide rows.

#1. Nope. Formulas return values to the cells that hold the formulas. They
can't do things like hide/unhide rows--or assign values to other cells.

#2. Yep.

You could put a checkbox from the Forms toolbar on your worksheet and assign it
a macro like:

Option Explicit
Sub testme()
With ActiveSheet
If .CheckBoxes(Application.Caller).Value = xlOn Then
.Range("17:23").EntireRow.Hidden = True
Else
.Range("17:23").EntireRow.Hidden = False
End If
End With
End Sub

or just a little easier to type:

Option Explicit
Sub testme()
With ActiveSheet
.Range("17:23").EntireRow.Hidden _
= CBool(.CheckBoxes(Application.Caller).Value = xlOn)
End With
End Sub

I'm not sure what "checked off" means <vbg. You may need to use xloff instead
of xlon.

Other things you could do...
Data|Filter|autofilter if there's a value in a field that can be used.

An event macro (worksheet_Calculate) that would monitor worksheet calculations
and if the criteria were met, something would happen.


NeedHelp wrote:

I was wondering if it was possible to have the result of a formula hide or
unhide rows.
Also, is it possible to use a checkbox in excel where if the box is checked
off then a row is unhidden and if the box remains unchecked a row is hidden?


--

Dave Peterson
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 rows if nil result of formula in specific column Joy Excel Discussion (Misc queries) 2 March 1st 10 02:33 AM
Hide a formula result until cell has been filled Sammy Excel Discussion (Misc queries) 13 May 19th 09 11:26 PM
Hide Rows Based on Cell Result BJ Excel Programming 2 April 14th 08 11:41 PM
Hide #VALUE! in result of array formula Ron Weaver Excel Worksheet Functions 6 January 29th 07 10:46 PM
Hide rows if formula result is zero John[_64_] Excel Programming 3 October 30th 03 05:57 PM


All times are GMT +1. The time now is 03:44 AM.

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

About Us

"It's about Microsoft Excel"