Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide AND Exclude?
Is there a feature in Excel that will allow me to EXCLUDE a row from a
calculation? I'm trying to keep the row (don't want to delete it), but exclude it from calculations. Here's an example: A B 1 "Y" 5 2 "Y" 4 3 "N" 5 4 "Y" 3 When I use the following, it HIDES row 3: Dim cell As Range For Each cell In Worksheets("worksheet").Range("A1:A4") If cell.Text < "Y" Then cell.EntireRow.Hidden = True End If However, when I use the following to SORT, it still considers the hidden cell: Selection.Sort Key1:=Range("A1:A4"), Order1:=xlAscending, Key2:=Range("A1"), Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom I want to EXCLUDE cell A3 because it isn't an "Y". Here's what I want to show: A 1 3 2 5 3 5 Any ideas? Thanks. Gary |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Want to Hide columns in spreadsheet but NOT hide data in chart. | Charts and Charting in Excel | |||
A1 = 200:1, B1 is 200 / 1 (200 from A1 - How to exclude :1?) | Excel Worksheet Functions | |||
Exclude a row from a SUM | Excel Discussion (Misc queries) | |||
Exclude | Excel Discussion (Misc queries) | |||
How do I hide a worksheet in Excel and use a password to un-hide . | Excel Discussion (Misc queries) |