![]() |
|
![]() |
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
![]()
H,
Heres the corrected code original did not show correctly. Sub Filter_NonBank() Application.ScreenUpdating = False Dim Myval As Integer Dim lrow As Long lrow = Sheets("Bin inventory").Range("g65536").End(xlUp).Row Selection.AutoFilter Sheets("Bin inventory").Range("A1:h1").Select Selection.AutoFilter With Selection .AutoFilter Field:=7, Criteria1:="<>" '' this set the filtered data for the value End With With Worksheets("Bin inventory").AutoFilter.Range Set VisRng = .Resize(.Rows.Count - 1, 1).Offset(1, 0) _ .Cells.SpecialCells(xlCellTypeVisible) '' make sure you have more than 1 row '' Myval = .Range("c2:c" & lrow).SpecialCells(xlCellTypeVisible).Count If Myval >= "2" Then Worksheets("Bin inventory").Range(Cells(VisRng.Offset(, 0).Row, 7), Cells(Range("g65536").End(xlUp).Row, 7)).Select End If End With End Sub |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Automatically add firm name to visible contactname | spqr² | Outlook | 0 | 12-29-2014 03:24 PM |
Change formula cell range based on cell value | Scoth | Excel | 4 | 10-25-2012 07:51 AM |
Email macro to read range for .To field | MattMurdock | Excel Programming | 2 | 08-07-2012 06:46 AM |
Can't create new email or access email acounts Outlook 2003 | onthebeaches | Outlook | 1 | 02-20-2012 10:21 PM |
Outlook Not Sending Automated Email Unless Visible | RMittelman | Outlook | 0 | 12-10-2010 11:18 AM |