Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default 2 Dimensional Array

Mark,

Sounds like you want a Select Case

Select Case value
Case 0 ' value = 0
result = A.txt, 1
Case 1
result = B.txt, 2
Case 3
....
End Select

replace "value" and "result" to fit your needs. I wasn't sure what you
meant by A.txt, 1 so you'll have to fix that to.
(Don't use the terms value or text or integer since they are reserved words
in Excel.)

This works like nested if's but is much neater.

steve

"Mark Frank" wrote in message
...
Hi all,

I am trying to create a two-dimensional array (kind of
like a lookup where columnA references columnB). I.e.

I have an integer 0 to 6
If the integer in the loop is 0, return A.txt, 1 then
B.txt, 2 then C.txt etc

Does anyone have an example of a 2-D array that basically
performs like the loop-up above? I do not want to nest if
statements, does not look proper.

Thanks in adavance,

Mark Frank



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
Lookup within a 2 dimensional array Edu Excel Worksheet Functions 5 March 31st 10 09:52 PM
2-dimensional array to 2 column list TDS Excel Discussion (Misc queries) 3 October 31st 06 05:49 PM
How do I convert a row of cells into a two-dimensional array? Glenn@stress Excel Worksheet Functions 7 October 10th 05 07:28 PM
Three Dimensional Array Question Tornados Excel Discussion (Misc queries) 1 June 20th 05 12:58 AM
Sorting a 2-dimensional array Vasant Nanavati[_2_] Excel Programming 3 July 12th 03 08:27 PM


All times are GMT +1. The time now is 09:03 AM.

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"