Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
tan tan is offline
external usenet poster
 
Posts: 29
Default Need a way to verify a string is present in 1-column array?

I need to verify than an operator string (part number) input is valid from a
predetermined listing of "acceptable" part numbers without getting #N/A
error. Help!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Need a way to verify a string is present in 1-column array?

Maybe you can use application.match()

Dim res as variant 'could be an error
dim myArr as variant
dim myVal as variant 'could be a number or string

myarr = array(1, 2, "abc", "def")

myval = "abc"
res = application.match(myval,myarr,0)

if iserror(res) then
'not found
else
'was found
end if



TAN wrote:

I need to verify than an operator string (part number) input is valid from a
predetermined listing of "acceptable" part numbers without getting #N/A
error. Help!


--

Dave Peterson
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
How to verify the first char of the string in excel? Eric Excel Discussion (Misc queries) 0 November 30th 06 03:57 AM
How to verify the first char of the string in excel? Teethless mama Excel Discussion (Misc queries) 0 November 30th 06 03:51 AM
How to verify the first char of the string in excel? Eric Excel Discussion (Misc queries) 0 November 30th 06 03:35 AM
Test for char in string & separating if present Ken Loomis Excel Programming 5 October 7th 04 06:38 PM
How to verify specific Worksheets are present TBA[_2_] Excel Programming 1 December 10th 03 08:18 AM


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