RE: using Autofilter to finad all values < 0 in a column range...
Well, I thought I had this solved but it 's not working the way it should...
BALANCES2018 is of course, a named range on Sheet REALBALS. There's no header row and the
range is only two columns A and B. The values on row 1 are
There is only ONE value <0 - on the last row which is row 54
and it is
When run, the code above is always giving this result copied to cells A1:B2 inthe REPORT sheet:
Why is it always grabbing that first value on row A1:B1 and including it in the copy code ?
(A1:B1 is always where the Autofilter drop down buttons are placed by this code)
The correct value copied over should just be
and NOT include 12/17 - 12/23 $1,386.20, the first values in the range. Tried to make this as
ubnderstandable as possible. Sorry for the long explanantion.
Thanks for anyone's help.
cr
Well, I thought I had this solved but it 's not working the way it should...
Code:
Private Sub cmdNegatives_Click()
Application.ScreenUpdating = False
Application.EnableEvents = False
Sheets("REALBALS").Activate
Range("BALANCES2018").Select 'new 12.17.17
With Selection
.AutoFilter Field:=2, Criteria1:="<0"
.SpecialCells(xlVisible).Copy Sheets("REPORT").Range("A1:B1")
End With
Selection.AutoFilter
Sheets("BUDGET").Activate
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
range is only two columns A and B. The values on row 1 are
Code:
12/17 - 12/23 $1,386.20
and it is
Code:
12/23 - 12/29 ($454.25)
Code:
12/17 - 12/23 $1,386.20
12/23 - 12/29 ($454.25)
(A1:B1 is always where the Autofilter drop down buttons are placed by this code)
The correct value copied over should just be
Code:
12/23 - 12/29 ($454.25)
ubnderstandable as possible. Sorry for the long explanantion.
Thanks for anyone's help.
cr