![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: England
Posts: 212
|
Have seen an earlier post that is similar to this but I can't quite get what I want, have tried this
Columns("A:A").CellValue(<2).EntireRow.Hidden = True Any Ideas? Thanks Matt |
|
|
|
|
|
#2 |
|
Guest
Posts: n/a
|
Either one of these :-
Sub Without_Loop() Application.ScreenUpdating = False Columns(1).Insert With Range([B1], [B65536].End(xlUp)).Offset(0, -1) .FormulaR1C1 = "=IF(RC[1]<2,1,"""")" On Error Resume Next .SpecialCells(xlCellTypeFormulas, 1).EntireRow.Hidden = True On Error GoTo 0 .Delete End With End Sub Sub With_Loop() Dim rng As Range, cell As Range Set rng = Range([A1], [A65536].End(xlUp)) Application.ScreenUpdating = False For Each cell In rng If cell.Value < 2 Then cell.EntireRow.Hidden = True Next End Sub |
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|