ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Advance Filter critera range (https://www.excelbanter.com/excel-programming/306276-advance-filter-critera-range.html)

Dwight Trumbower

Advance Filter critera range
 
When using the CriteriaRange do you have to point to a range or can you have
a variable with the correct format?

From the examples it looks you need to point to a range. Either a column
name, value combination or a range formula.

What I'm trying to do is take a spreadsheet that has four distinct values in
column 3 and filtercopy on each value into a new sheet. The data range is
105 columns and many rows with now headings. I create a tmp sheet with
unique values from column 3 and then try to create a range formula, =c1="F".
It seems silly that I can't use this in the criteriaRange:=. I'm sure I'm
doing something wrong.

Thanks



Tom Ogilvy

Advance Filter critera range
 
The criteria must be a range.

--
Regards,
Tom Ogilvy

"Dwight Trumbower" wrote in message
...
When using the CriteriaRange do you have to point to a range or can you

have
a variable with the correct format?

From the examples it looks you need to point to a range. Either a column
name, value combination or a range formula.

What I'm trying to do is take a spreadsheet that has four distinct values

in
column 3 and filtercopy on each value into a new sheet. The data range is
105 columns and many rows with now headings. I create a tmp sheet with
unique values from column 3 and then try to create a range formula,

=c1="F".
It seems silly that I can't use this in the criteriaRange:=. I'm sure I'm
doing something wrong.

Thanks





Dwight Trumbower

Advance Filter critera range
 
When do the following: tmpSheet.Range("B1").Value = "=C9" & Chr(34) & "=" &
myCell.Value & Chr(34)
I get false for the value instead of =C9="F". myCell.Value = F


Dwight

"Tom Ogilvy" wrote in message
...
The criteria must be a range.

--
Regards,
Tom Ogilvy

"Dwight Trumbower" wrote in message
...
When using the CriteriaRange do you have to point to a range or can you

have
a variable with the correct format?

From the examples it looks you need to point to a range. Either a column
name, value combination or a range formula.

What I'm trying to do is take a spreadsheet that has four distinct

values
in
column 3 and filtercopy on each value into a new sheet. The data range

is
105 columns and many rows with now headings. I create a tmp sheet with
unique values from column 3 and then try to create a range formula,

=c1="F".
It seems silly that I can't use this in the criteriaRange:=. I'm sure

I'm
doing something wrong.

Thanks








All times are GMT +1. The time now is 02:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com