VBA Advanced Filter unexpected result

vcto

New Member
Joined
Nov 10, 2011
Messages
4
I query a large database for errors between .301 and .31, class G. There are errors of class G+, which I don't need.

Criteria

A B C
2 Error Error Class
3 >.301 <.31 G


Code

Sub AdvFilter01()
Sheets("TestResults 2011-10").Range("A1:AR90000"). _
AdvancedFilter xlFilterCopy, _
Sheets("Filter01").Range("A2:C3"), _
Sheets("Filter01").Range("A6:B6")
End Sub

Output
A B
6 Error Class
7 0.303 G
8 0.302 G
9 0.304 G
10 0.306 G
11 0.302 G+
12 0.303 G+

Why am I getting G+?

Thank you,
vcto
 
Last edited:

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Hi
Welcome to the board

If you specify

Class
G

This means you want strings starting with G.

If you just want the letter G then 3 options:

With the cell formatted as general use one of the 2

="=G"
or
'=G

or with the cell formatted as text use

=G
 
Upvote 0

Forum statistics

Threads
1,214,800
Messages
6,121,641
Members
449,044
Latest member
hherna01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top