# Find a value in a matrix array

AnandK - Feb 11, 2018 at 01:17 PM - Latest reply: ac3mark 8835 Posts Monday June 3, 2013Registration dateModeratorStatus February 22, 2018 Last seen - Feb 12, 2018 at 04:52 PM
Hello,
Is there any formula to find a value in a matrix array
A program in gw basic i want to change it into excel.

Suppose
A B C D E F
0.1, .25,. .3, .55,. .7, .8
.0099, .0087, .0076, .0055, .0032, .0012

And i know a value is 0.2605 which falls between B1 AND C1, and i want to calculate between B2 AND C2 and so on accordingly.

If u can help me can u pls mail me.
See more

ac3mark 8835 Posts Monday June 3, 2013Registration dateModeratorStatus February 22, 2018 Last seen -
0
YOU can "SELECT CASE", as in

`variable_a = 5Select Case variable_a       Case 1 To 5        MSGBOX("Between 1 and 5, inclusive")        ' The following is the only Case clause that evaluates to True.    Case 6, 7, 8        MSGBOX("Between 6 and 8, inclusive")End select`

It is that simple!

BTW, this is just a table, or a matrix. If it were an array, it would be in the form of:

Value_A(0)=0.1
Value_A(1)=.25

and so on, storing the values in a variable of VALUE_A, at an index (always starts with 0)!!! So, if I wanted to access the value at the 255 index of VALUE-A, I would say:

`dim thevaluethevalue=VALUE_A(254)msgbox(thevalue)`

Have FUN! Let us know if you get stuck!
Respond to ac3mark

Gmail,

Excel,