Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default using Criteria with two possible values


I have something that looks like so in a macro code.
Criteria1:="not in system"
how do I make it for more than one thing? I want the criteria to b
"not in system" or "NOT OKC". I dont even know how to word this to ge
my answer with microsoft help. Any guidance would be appreciated.
Thanks in advance

--
DK
-----------------------------------------------------------------------
DKY's Profile: http://www.excelforum.com/member.php...fo&userid=1451
View this thread: http://www.excelforum.com/showthread.php?threadid=27563

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default using Criteria with two possible values

Hi DKY

it would probably be better if you posted a bit more of your code, is this
for filtering of excel lists?
if so then

Selection.AutoFilter Field:=1, Criteria1:="=not in system",
Operator:=xlOr, _
Criteria2:="=NOT OKC"

if it's for something else, please post back

Regards
JulieD



"DKY" wrote in message
...

I have something that looks like so in a macro code.
Criteria1:="not in system"
how do I make it for more than one thing? I want the criteria to be
"not in system" or "NOT OKC". I dont even know how to word this to get
my answer with microsoft help. Any guidance would be appreciated.
Thanks in advance.


--
DKY
------------------------------------------------------------------------
DKY's Profile:
http://www.excelforum.com/member.php...o&userid=14515
View this thread: http://www.excelforum.com/showthread...hreadid=275631



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default using Criteria with two possible values

DKY,

Criteria1:="=not in system", _
Operator:=xlOr, _
Criteria2:="=NOT OKC"

You could get that code by recording a macro and applying the autofilter.

HTH,
Bernie
MS Excel MVP

"DKY" wrote in message
...

I have something that looks like so in a macro code.
Criteria1:="not in system"
how do I make it for more than one thing? I want the criteria to be
"not in system" or "NOT OKC". I dont even know how to word this to get
my answer with microsoft help. Any guidance would be appreciated.
Thanks in advance.


--
DKY
------------------------------------------------------------------------
DKY's Profile:

http://www.excelforum.com/member.php...o&userid=14515
View this thread: http://www.excelforum.com/showthread...hreadid=275631



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default using Criteria with two possible values

Your query is not very clear.

Criteria:="not in system" suggests that you are calling a routine which
expects an argument called Criteria.

If I understand the rest of the query, you want to control the flow of the
code depending on the value of Criteria. Try


Sub xx(ByVal Criteria as string)




"DKY" wrote:


I have something that looks like so in a macro code.
Criteria1:="not in system"
how do I make it for more than one thing? I want the criteria to be
"not in system" or "NOT OKC". I dont even know how to word this to get
my answer with microsoft help. Any guidance would be appreciated.
Thanks in advance.


--
DKY
------------------------------------------------------------------------
DKY's Profile: http://www.excelforum.com/member.php...o&userid=14515
View this thread: http://www.excelforum.com/showthread...hreadid=275631


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default using Criteria with two possible values

The reply was incomplete ....

Your query is not very clear.

Criteria:="not in system" suggests that you are calling a routine which
expects an argument called Criteria.

If I understand the rest of the query, you want to control the flow of the
code depending on the value of Criteria. Try


Sub xx(ByVal Criteria as string)

select case criteria
case "not in system"
' your code
case "NOT OKC"
' your code code
case else
' your code
end sub



"AA2e72E" wrote:

Your query is not very clear.

Criteria:="not in system" suggests that you are calling a routine which
expects an argument called Criteria.

If I understand the rest of the query, you want to control the flow of the
code depending on the value of Criteria. Try


Sub xx(ByVal Criteria as string)




"DKY" wrote:


I have something that looks like so in a macro code.
Criteria1:="not in system"
how do I make it for more than one thing? I want the criteria to be
"not in system" or "NOT OKC". I dont even know how to word this to get
my answer with microsoft help. Any guidance would be appreciated.
Thanks in advance.


--
DKY
------------------------------------------------------------------------
DKY's Profile: http://www.excelforum.com/member.php...o&userid=14515
View this thread: http://www.excelforum.com/showthread...hreadid=275631


Reply
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
Sum of values based on different criteria Irene Excel Discussion (Misc queries) 4 November 19th 08 11:17 PM
Looking up values with multiple criteria CodyT Excel Worksheet Functions 1 June 24th 08 11:14 PM
Looking up values based on two criteria LauriS Excel Worksheet Functions 8 August 24th 07 02:30 PM
Frequency of values with Criteria Michelle Wong Excel Worksheet Functions 4 September 13th 05 05:07 AM


All times are GMT +1. The time now is 11:33 PM.

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

About Us

"It's about Microsoft Excel"