LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Building criteria string for Advanced Filter variable not resolvin

I am building a criteria string for an Advanced Filter feature. The string
values exist in a spreadsheet. I need to prepend ="= and append a trailing
quote. When I do the varialbe myCriteria does not resolve. Here is the code
snippet:

Dim iRow As Intege
Dim myCriteria As String
iRow = 2
For Each c In Worksheets("WatchCriteria").Range("A2:A19")
If c.Value < "" Then
myCriteria = c.Value
Worksheets("WatchList").Range(Cells(iRow, 2), Cells(iRow, 2)).Formula
= "=""=myCriteria"""
iRow = iRow + 1
End If
Next c

I want the actual value of the myCriteria variable to resolve within the
cell. Instead I get
="=myCriteria"

Can anyone suggest a way to do this?
 
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
Advanced filter criteria Phil C Excel Discussion (Misc queries) 4 April 10th 07 07:48 AM
Advanced Filter (Criteria + Blanks) SamuelT Excel Discussion (Misc queries) 4 July 5th 06 05:03 PM
Need Advanced Filter with NOT equal string and OR criteria MK Excel Discussion (Misc queries) 5 December 7th 05 02:28 PM
Advanced filter and Criteria Range gearoid Excel Discussion (Misc queries) 2 July 20th 05 02:33 PM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM


All times are GMT +1. The time now is 02:52 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"