# Find a value in a matrix array

Closed
AnandK - Updated on Feb 11, 2018 at 05:06 PM
Blocked Profile - Mar 4, 2018 at 04:10 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.
Related:

## 1 response

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!
Web
more
Primary
Excel forum - Find a value in a matrix array - ac3mark's answer
C
CCM
[image: CCM] Hello AnandK, Vous avez demandé à recevoir les réponses au message de AnandK intitulé « Find a value in a matrix array » datant du Feb...
A
A K
to CCM
11 days agoDetails

but i am still unable to resolve it. Below is the actual program in GW-Basic.

140 IF STYP\$="XYZ" OR STYP\$="xyz" THEN SN%=22:ZN%=2100:RUMIN=.0025

190 IF ZN%=0 THEN LPRINT KO\$;" FALSCHER SCHWEBEKÖRPERTYP":GOTO 1470

200 ZZ%=ZN%/100-1

280 RUM = .0051998

290 RUK = .0260146

300 FM = 2032.034

310 FK = 4562.0847

320 REM ****** Selection of required columns of the calibration chart ************
330 OPEN "R", # 1, STYP \$ + ". CAL", 4
340 FIELD # 1.4 AS A \$
350 IF RUK> = 10 THEN KK1% = SN%: GOTO 420
360 IF RUK <= RUMIN THEN KK1% = 2: GOTO 420
370 FOR KK% = 1 TO SN%
380 GET # 1,100 + KK%

390 RUKX=CVS(A\$)
400 IF RUKX>RUK THEN KK1%=KK%:GOTO 420
410 NEXT KK%
420 GET#1,99+KK1%:RUK1=CVS(A\$)
430 GET#1,100+KK1%:RUK2=CVS(A\$)
440 IF RUM>=10 THEN KM1%=SN%:GOTO 500
450 IF RUM<=RUMIN THEN KM1%=2:GOTO 500
460 FOR KM%=1 TO SN%
470 GET#1,100+KM%:RUMX=CVS(A\$)
480 IF RUMX>RUM THEN KM1%=KM%:GOTO 500
490 NEXT KM%
500 GET#1,99+KM1%:RUM1=CVS(A\$)
510 GET#1,100+KM1%:RUM2=CVS(A\$)

520 REM ************* reading the given values ******************************
530 FOR I%=200 TO ZN% STEP 100
540 J%=I%/100-1
550 GET#1,I%+KK1%:ALK2=CVS(A\$)
560 GET#1,I%+KK1%-1:ALK1=CVS(A\$)
570 GET#1,I%+KM1%:ALM2=CVS(A\$)
580 GET#1,I%+KM1%-1:ALM1=CVS(A\$)

590 REM ********** Averaging between two columns *******************
600 LNE = .5575654
610 K1 = LOG (ALK1): K2 = LOG (ALK2)
620 RK = LOG (RUK): RK1 = LOG (RUK1): RK2 = LOG (RUK2)
630 M1 = LOG (ALM1): M2 = LOG (ALM2)
640 RM = LOG (RUM): RM1 = LOG (RUM1): RM2 = LOG (RUM2)
650 LALK = LNE * (K2-K1) * ((RK-RK1) / (RK2-RK1)) + LNE * K1
660 ALK = 10 ^ LALK: KA (J%) = ALK * FK
670 LALM = LNE * (M2-M1) * ((RM-RM1) / (RM2-RM1)) + LNE * M1
680 ALM = 10 ^ LALM: ME (J%) = ALM * FM
690 NEXT I%

but i am still unable to resolve it. Below is the actual program in GW-Basic.

140 IF STYP\$="XYZ" OR STYP\$="xyz" THEN SN%=22:ZN%=2100:RUMIN=.0025

190 IF ZN%=0 THEN LPRINT KO\$;" FALSCHER SCHWEBEKÖRPERTYP":GOTO 1470

200 ZZ%=ZN%/100-1

280 RUM = .0051998

290 RUK = .0260146

300 FM = 2032.034

310 FK = 4562.0847

320 REM ****** Selection of required columns of the calibration chart ************
330 OPEN "R", # 1, STYP \$ + ". CAL", 4
340 FIELD # 1.4 AS A \$
350 IF RUK> = 10 THEN KK1% = SN%: GOTO 420
360 IF RUK <= RUMIN THEN KK1% = 2: GOTO 420
370 FOR KK% = 1 TO SN%
380 GET # 1,100 + KK%

390 RUKX=CVS(A\$)
400 IF RUKX>RUK THEN KK1%=KK%:GOTO 420
410 NEXT KK%
420 GET#1,99+KK1%:RUK1=CVS(A\$)
430 GET#1,100+KK1%:RUK2=CVS(A\$)
440 IF RUM>=10 THEN KM1%=SN%:GOTO 500
450 IF RUM<=RUMIN THEN KM1%=2:GOTO 500
460 FOR KM%=1 TO SN%
470 GET#1,100+KM%:RUMX=CVS(A\$)
480 IF RUMX>RUM THEN KM1%=KM%:GOTO 500
490 NEXT KM%
500 GET#1,99+KM1%:RUM1=CVS(A\$)
510 GET#1,100+KM1%:RUM2=CVS(A\$)

520 REM ************* reading the given values ******************************
530 FOR I%=200 TO ZN% STEP 100
540 J%=I%/100-1
550 GET#1,I%+KK1%:ALK2=CVS(A\$)
560 GET#1,I%+KK1%-1:ALK1=CVS(A\$)
570 GET#1,I%+KM1%:ALM2=CVS(A\$)
580 GET#1,I%+KM1%-1:ALM1=CVS(A\$)

590 REM ********** Averaging between two columns *******************
600 LNE = .5575654
610 K1 = LOG (ALK1): K2 = LOG (ALK2)
620 RK = LOG (RUK): RK1 = LOG (RUK1): RK2 = LOG (RUK2)
630 M1 = LOG (ALM1): M2 = LOG (ALM2)
640 RM = LOG (RUM): RM1 = LOG (RUM1): RM2 = LOG (RUM2)
650 LALK = LNE * (K2-K1) * ((RK-RK1) / (RK2-RK1)) + LNE * K1
660 ALK = 10 ^ LALK: KA (J%) = ALK * FK
670 LALM = LNE * (M2-M1) * ((RM-RM1) / (RM2-RM1)) + LNE * M1
680 ALM = 10 ^ LALM: ME (J%) = ALM * FM
690 NEXT I%

Web
more
Primary
Excel forum - Find a value in a matrix array - ac3mark's answer
C
CCM
to me
13 days agoDetails
CCM
Hello AnandK,
Vous avez demandé à recevoir les réponses au message de AnandK intitulé « Find a value in a matrix array » datant du February 12, 2018 at 04:52 PM posté dans « Excel ».

YOU can "SELECT CASE", as in

Select Case variable_a

--
It's kind of fun to do the impossible! -Walter Elias Disney
The issue is solved
The issue is unsolved

The CCM support forum operates on the basis of mutual help, that's why we thank you in advance to give all the details to solve your problem at best and possibly provide a regular summary of the actions taken and tracks that helped you.

A few words of thanks to those seeking to help you will be greatly appreciated.

See you soon on CCM.
Knowledge communities.
https://ccm.net/
This email has been automatically generated. Replies to this address will not be monitored.
Stop sending emails concerning this topic thread
CCM Benchmark Group - 94 Rue de Provence 75009 Paris - FRANCE
A
A K
to CCM
11 days agoDetails

but i am still unable to resolve it. Below is the actual program in GW-Basic.

140 IF STYP\$="XYZ" OR STYP\$="xyz" THEN SN%=22:ZN%=2100:RUMIN=.0025

190 IF ZN%=0 THEN LPRINT KO\$;" FALSCHER SCHWEBEKÖRPERTYP":GOTO 1470

200 ZZ%=ZN%/100-1

280 RUM = .0051998

290 RUK = .0260146

300 FM = 2032.034

310 FK = 4562.0847

320 REM ****** Selection of required columns of the calibration chart ************
330 OPEN "R", # 1, STYP \$ + ". CAL", 4
340 FIELD # 1.4 AS A \$
350 IF RUK> = 10 THEN KK1% = SN%: GOTO 420
360 IF RUK <= RUMIN THEN KK1% = 2: GOTO 420
370 FOR KK% = 1 TO SN%
380 GET # 1,100 + KK%

390 RUKX=CVS(A\$)
400 IF RUKX>RUK THEN KK1%=KK%:GOTO 420
410 NEXT KK%
420 GET#1,99+KK1%:RUK1=CVS(A\$)
430 GET#1,100+KK1%:RUK2=CVS(A\$)
440 IF RUM>=10 THEN KM1%=SN%:GOTO 500
450 IF RUM<=RUMIN THEN KM1%=2:GOTO 500
460 FOR KM%=1 TO SN%
470 GET#1,100+KM%:RUMX=CVS(A\$)
480 IF RUMX>RUM THEN KM1%=KM%:GOTO 500
490 NEXT KM%
500 GET#1,99+KM1%:RUM1=CVS(A\$)
510 GET#1,100+KM1%:RUM2=CVS(A\$)

520 REM ************* reading the given values ******************************
530 FOR I%=200 TO ZN% STEP 100
540 J%=I%/100-1
550 GET#1,I%+KK1%:ALK2=CVS(A\$)
560 GET#1,I%+KK1%-1:ALK1=CVS(A\$)
570 GET#1,I%+KM1%:ALM2=CVS(A\$)
580 GET#1,I%+KM1%-1:ALM1=CVS(A\$)

590 REM ********** Averaging between two columns *******************
600 LNE = .5575654
610 K1 = LOG (ALK1): K2 = LOG (ALK2)
620 RK = LOG (RUK): RK1 = LOG (RUK1): RK2 = LOG (RUK2)
630 M1 = LOG (ALM1): M2 = LOG (ALM2)
640 RM = LOG (RUM): RM1 = LOG (RUM1): RM2 = LOG (RUM2)
650 LALK = LNE * (K2-K1) * ((RK-RK1) / (RK2-RK1)) + LNE * K1
660 ALK = 10 ^ LALK: KA (J%) = ALK * FK
670 LALM = LNE * (M2-M1) * ((RM-RM1) / (RM2-RM1)) + LNE * M1
680 ALM = 10 ^ LALM: ME (J%) = ALM * FM
690 NEXT I%

0.0025
0.005
0.01
0.016
0.022
0.033
0.05
0.02
0.026844
0.025145
0.022685
0.019733
0.017441
0.014154
0.011054
0.03
0.039297
0.037598
0.034526
0.031126
0.028745
0.025378
0.021614
0.04
0.052495
0.049946
0.046311
0.042645
0.040245
0.036878
0.032619
0.05
0.06484
0.062009
0.058371
0.054961
0.052324
0.048671
0.044125
0.06
0.078594
0.075196
0.070719
0.06678
0.064104
0.060183
0.055901
0.07
0.092067
0.088102
0.08362
0.079679
0.077007
0.073085
0.067978
0.08
0.104412
0.100165
0.095125
0.090916
0.087963
0.084025
0.079468
0.1
0.129368
0.125403
0.120644
0.116692
0.11377
0.109562
0.103893
0.12
0.15942
0.153191
0.147298
0.142813
0.140384
0.135401
0.129424
0.14
0.185783
0.179554
0.173384
0.168114
0.164046
0.16004
0.154383
0.16
0.211553
0.207023
0.200591
0.195571
0.191535
0.18699
0.18021
0.18
0.23851
0.23228
0.225555
0.220268
0.216747
0.212235
0.204905

Values rum ruk

0.02 0.0159929 0.0249733

0.03 0.0272925 0.0373818

0.04 0.0388037 0.0496892

0.05 0.0507639 0.0617478

0.06 0.0624311 0.0877797

0.07 0.0753343 0.0877797

0.08 0.0862828 0.0997983

0.10 0.1119719 0.1250455

0.12 0.1382536 0.1527484

0.14 0.1623209 0.1790833

0.16 0.1895763 0.2065238

0.18 0.2147948 0.2317521

How do we get these values from.the table of array
How to do this in excel
Blocked Profile
Feb 26, 2018 at 04:53 PM
You are confused!

We don't do that. You are asking an excel question, but really not. We do not provide turn key solutions to convert your programs.
fine i was just asking how is it working... never mind how can i delete this thread now