LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Listing multiple values in a macro

Can't get this macro to work. Has something to do with the way I'm listing
the values but I don't know how to do this properly. Also, I need to be able
to list over 60 values (not just the 3 shown below), i just truncated for
this post. Please help!!!

Sub CheckNNumbers()
Dim RowNdx As Long
Dim LastRow As Long
StartRow = 2
LastRow = ActiveSheet.UsedRange.Rows.Count
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "R").Value = "N117CH" Or "N917SH" Or "N911WK" Then
MsgBox "Invalid Aircraft No."
End If
Next RowNdx
End Sub

Again, I just need to know how to "list" multiple values. I've tried using
commas in place of the "Or" statements but nothing works! Please help!!!
 
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
Listing values that meet a criteria. jenna mul Excel Discussion (Misc queries) 3 May 28th 08 10:56 AM
Listing values minus the zero amounts Carpet Guy Excel Worksheet Functions 1 May 23rd 08 09:57 PM
Idenifying and Listing Duplicate Values in a Table? PBJ Excel Discussion (Misc queries) 0 October 24th 06 05:03 PM
various values and listing them donjuan66 Excel Worksheet Functions 2 November 13th 05 12:55 PM
listing values to choose from based on value in another cell MT Excel Discussion (Misc queries) 1 September 12th 05 01:37 PM


All times are GMT +1. The time now is 11:48 AM.

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"