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: 42
Default Testing for a value's inclusion in an array

If I have the following in my code ...

Dim intEFX As Integer
Dim A As Variant
A = Array(1, 4, 6, 9)

.... then how do I test for intEFX being equal to a value in the array after
assigning it a value, and without going If intEFX = A(0) OR intEFX = A(1),
etc? That's a reasonable way to go with a tiny array, but there's got to be a
more elegant solution for larger arrays, right?

Tried looking for a help topic that combined IF and arrays, but not having
any luck, so any help provided would be much appreciated. Thank you.

 
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
Conditional Testing of an array Lord Robocop Excel Worksheet Functions 1 May 7th 09 03:22 AM
Converting an Array to value's Gunti Excel Discussion (Misc queries) 12 November 3rd 08 02:51 PM
combo box and value's Trey Excel Discussion (Misc queries) 0 July 11th 07 08:36 PM
Testing a string array for any values Chris W. Excel Programming 9 March 21st 05 02:13 PM
text inclusion GeoffM Excel Programming 0 May 13th 04 11:26 PM


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