LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Adv Filter Formula Criteria

I'm trying to access the Advanced Filter Programmatically. I have a crude
macro that runs to completion but falters on:

y.Range("C2").Formula = "=" & "OR(Source!J2<" & """""" _
& "," & "AND" & "(Source!K2<" & """""" _
& ",Source!K2<" & "" & """Consumer""" & "))" & ""

This is what ends up in the cell:
=OR(Source!#REF!<"",AND(Source!#REF!<"",Source!# REF!<"Consumer"))

It should be:
=OR(Source!J7<"",AND(Source!K7<"",Source!K7<"Co nsumer"))

How can I rewrite this so it will create a working formula in the cell? I
know criteria work because I can run the Advanced Filter successfully if I do
it manually.

--
tj
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
formula to find the filter criteria [email protected] Excel Worksheet Functions 12 December 30th 05 07:04 PM
Advanced Filter criteria (formula) Gareth Excel Worksheet Functions 3 December 20th 05 09:12 PM
Filter criteria Tony Excel Discussion (Misc queries) 2 November 24th 05 10:40 AM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM
Filter Criteria desmondleow[_7_] Excel Programming 1 December 16th 03 01:10 PM


All times are GMT +1. The time now is 09:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"