Home » Archimedes archive » Zipped Apps » PipeDream » Functions/Lookup

Functions/Lookup

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Zipped Apps » PipeDream
Filename: Functions/Lookup
Read OK:
File size: 055F bytes
Load address: 0000
Exec address: 0000
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
%OP%VS4.12 Test (Dec 12 1991), Colton Software - Development, R0123 4567 8901 2345
%OP%DP0
%OP%LP*
%OP%TM4
%OP%BM4
%OP%LM5
%OP%FX
%OP%FY
%OP%FS
%OP%WC2,2154,708,1364,0,0,0,0
%CO:A,10,100%
%C%%H1%Lookup Functions Examples







%C%Function

CHOOSE
LOOKUP
HLOOKUP
VLOOKUP
MATCH
INDEX
%CO:B,9,0%


%V%%C%8
%V%%C%7
%V%%C%2
%V%%C%11
%V%%C%6

%R%Input 1

%V%%R%4
%V%%R%11
%V%%R%7
%V%%R%17
%V%%R%13
%V%%R%{11,12,13;21,22,23;31,32,33}
%CO:C,9,0%


%V%%C%5
%V%%C%12
%V%%C%7
%V%%C%9
%V%%C%17

%R%Input 2

%R%B4B8
%R%B4B8
%R%B5E5
%R%C4C8
%R%B4E4
%V%%R%3
%CO:D,9,0%


%V%%C%10
%V%%C%13
%V%%C%7
%V%%C%5
%V%%C%12

%R%Input 3

%R%-
%R%C4C8
%V%%R%2
%V%%R%1
%V%%R%1
%V%%R%1
%CO:E,8,90%


%V%%C%12
%V%%C%19
%V%%C%1
%V%%C%7
%V%%C%1

%R%Result

%V%%R%choose(B12,B4B8)
%V%%R%lookup(B13,B4B8,C4C8)
%V%%R%hlookup(B14,B5E5,D14)
%V%%R%vlookup(B15,C4C8,D15)
%V%%R%match(B16,B4E4,D16)
%V%%R%index(B17,C17,D17)
%CO:F,2,0%%CO:G,82,0%








%L%Summary

Returns the %H4%Input1%H4%%H6%st%H6% entry from a list of numbers.
Returns the value in range 2 corresponding to the position of %H4%Input1%H4% in range 1.
As for Lookup, but range 2 given as a horizontal offset (%H4%Input3%H4%) from range 1.
As for Lookup, but range 2 given as a vertical offset (%H4%Input3%H4%) from range 1.
Returns the value in the range which %H4%Input1%H4% matches.
Returns the desired single element or subarray of an array.
00000000  25 4f 50 25 56 53 34 2e  31 32 20 54 65 73 74 20  |%OP%VS4.12 Test |
00000010  28 44 65 63 20 31 32 20  31 39 39 31 29 2c 20 43  |(Dec 12 1991), C|
00000020  6f 6c 74 6f 6e 20 53 6f  66 74 77 61 72 65 20 2d  |olton Software -|
00000030  20 44 65 76 65 6c 6f 70  6d 65 6e 74 2c 20 52 30  | Development, R0|
00000040  31 32 33 20 34 35 36 37  20 38 39 30 31 20 32 33  |123 4567 8901 23|
00000050  34 35 0a 25 4f 50 25 44  50 30 0a 25 4f 50 25 4c  |45.%OP%DP0.%OP%L|
00000060  50 2a 0a 25 4f 50 25 54  4d 34 0a 25 4f 50 25 42  |P*.%OP%TM4.%OP%B|
00000070  4d 34 0a 25 4f 50 25 4c  4d 35 0a 25 4f 50 25 46  |M4.%OP%LM5.%OP%F|
00000080  58 0a 25 4f 50 25 46 59  0a 25 4f 50 25 46 53 0a  |X.%OP%FY.%OP%FS.|
00000090  25 4f 50 25 57 43 32 2c  32 31 35 34 2c 37 30 38  |%OP%WC2,2154,708|
000000a0  2c 31 33 36 34 2c 30 2c  30 2c 30 2c 30 0a 25 43  |,1364,0,0,0,0.%C|
000000b0  4f 3a 41 2c 31 30 2c 31  30 30 25 0a 25 43 25 25  |O:A,10,100%.%C%%|
000000c0  48 31 25 4c 6f 6f 6b 75  70 20 46 75 6e 63 74 69  |H1%Lookup Functi|
000000d0  6f 6e 73 20 45 78 61 6d  70 6c 65 73 0a 0a 0a 0a  |ons Examples....|
000000e0  0a 0a 0a 0a 25 43 25 46  75 6e 63 74 69 6f 6e 0a  |....%C%Function.|
000000f0  0a 43 48 4f 4f 53 45 0a  4c 4f 4f 4b 55 50 0a 48  |.CHOOSE.LOOKUP.H|
00000100  4c 4f 4f 4b 55 50 0a 56  4c 4f 4f 4b 55 50 0a 4d  |LOOKUP.VLOOKUP.M|
00000110  41 54 43 48 0a 49 4e 44  45 58 0a 25 43 4f 3a 42  |ATCH.INDEX.%CO:B|
00000120  2c 39 2c 30 25 0a 0a 0a  25 56 25 25 43 25 38 0a  |,9,0%...%V%%C%8.|
00000130  25 56 25 25 43 25 37 0a  25 56 25 25 43 25 32 0a  |%V%%C%7.%V%%C%2.|
00000140  25 56 25 25 43 25 31 31  0a 25 56 25 25 43 25 36  |%V%%C%11.%V%%C%6|
00000150  0a 0a 25 52 25 49 6e 70  75 74 20 31 0a 0a 25 56  |..%R%Input 1..%V|
00000160  25 25 52 25 34 0a 25 56  25 25 52 25 31 31 0a 25  |%%R%4.%V%%R%11.%|
00000170  56 25 25 52 25 37 0a 25  56 25 25 52 25 31 37 0a  |V%%R%7.%V%%R%17.|
00000180  25 56 25 25 52 25 31 33  0a 25 56 25 25 52 25 7b  |%V%%R%13.%V%%R%{|
00000190  31 31 2c 31 32 2c 31 33  3b 32 31 2c 32 32 2c 32  |11,12,13;21,22,2|
000001a0  33 3b 33 31 2c 33 32 2c  33 33 7d 0a 25 43 4f 3a  |3;31,32,33}.%CO:|
000001b0  43 2c 39 2c 30 25 0a 0a  0a 25 56 25 25 43 25 35  |C,9,0%...%V%%C%5|
000001c0  0a 25 56 25 25 43 25 31  32 0a 25 56 25 25 43 25  |.%V%%C%12.%V%%C%|
000001d0  37 0a 25 56 25 25 43 25  39 0a 25 56 25 25 43 25  |7.%V%%C%9.%V%%C%|
000001e0  31 37 0a 0a 25 52 25 49  6e 70 75 74 20 32 0a 0a  |17..%R%Input 2..|
000001f0  25 52 25 42 34 42 38 0a  25 52 25 42 34 42 38 0a  |%R%B4B8.%R%B4B8.|
00000200  25 52 25 42 35 45 35 0a  25 52 25 43 34 43 38 0a  |%R%B5E5.%R%C4C8.|
00000210  25 52 25 42 34 45 34 0a  25 56 25 25 52 25 33 0a  |%R%B4E4.%V%%R%3.|
00000220  25 43 4f 3a 44 2c 39 2c  30 25 0a 0a 0a 25 56 25  |%CO:D,9,0%...%V%|
00000230  25 43 25 31 30 0a 25 56  25 25 43 25 31 33 0a 25  |%C%10.%V%%C%13.%|
00000240  56 25 25 43 25 37 0a 25  56 25 25 43 25 35 0a 25  |V%%C%7.%V%%C%5.%|
00000250  56 25 25 43 25 31 32 0a  0a 25 52 25 49 6e 70 75  |V%%C%12..%R%Inpu|
00000260  74 20 33 0a 0a 25 52 25  2d 0a 25 52 25 43 34 43  |t 3..%R%-.%R%C4C|
00000270  38 0a 25 56 25 25 52 25  32 0a 25 56 25 25 52 25  |8.%V%%R%2.%V%%R%|
00000280  31 0a 25 56 25 25 52 25  31 0a 25 56 25 25 52 25  |1.%V%%R%1.%V%%R%|
00000290  31 0a 25 43 4f 3a 45 2c  38 2c 39 30 25 0a 0a 0a  |1.%CO:E,8,90%...|
000002a0  25 56 25 25 43 25 31 32  0a 25 56 25 25 43 25 31  |%V%%C%12.%V%%C%1|
000002b0  39 0a 25 56 25 25 43 25  31 0a 25 56 25 25 43 25  |9.%V%%C%1.%V%%C%|
000002c0  37 0a 25 56 25 25 43 25  31 0a 0a 25 52 25 52 65  |7.%V%%C%1..%R%Re|
000002d0  73 75 6c 74 0a 0a 25 56  25 25 52 25 63 68 6f 6f  |sult..%V%%R%choo|
000002e0  73 65 28 42 31 32 2c 42  34 42 38 29 0a 25 56 25  |se(B12,B4B8).%V%|
000002f0  25 52 25 6c 6f 6f 6b 75  70 28 42 31 33 2c 42 34  |%R%lookup(B13,B4|
00000300  42 38 2c 43 34 43 38 29  0a 25 56 25 25 52 25 68  |B8,C4C8).%V%%R%h|
00000310  6c 6f 6f 6b 75 70 28 42  31 34 2c 42 35 45 35 2c  |lookup(B14,B5E5,|
00000320  44 31 34 29 0a 25 56 25  25 52 25 76 6c 6f 6f 6b  |D14).%V%%R%vlook|
00000330  75 70 28 42 31 35 2c 43  34 43 38 2c 44 31 35 29  |up(B15,C4C8,D15)|
00000340  0a 25 56 25 25 52 25 6d  61 74 63 68 28 42 31 36  |.%V%%R%match(B16|
00000350  2c 42 34 45 34 2c 44 31  36 29 0a 25 56 25 25 52  |,B4E4,D16).%V%%R|
00000360  25 69 6e 64 65 78 28 42  31 37 2c 43 31 37 2c 44  |%index(B17,C17,D|
00000370  31 37 29 0a 25 43 4f 3a  46 2c 32 2c 30 25 25 43  |17).%CO:F,2,0%%C|
00000380  4f 3a 47 2c 38 32 2c 30  25 0a 0a 0a 0a 0a 0a 0a  |O:G,82,0%.......|
00000390  0a 0a 25 4c 25 53 75 6d  6d 61 72 79 0a 0a 52 65  |..%L%Summary..Re|
000003a0  74 75 72 6e 73 20 74 68  65 20 25 48 34 25 49 6e  |turns the %H4%In|
000003b0  70 75 74 31 25 48 34 25  25 48 36 25 73 74 25 48  |put1%H4%%H6%st%H|
000003c0  36 25 20 65 6e 74 72 79  20 66 72 6f 6d 20 61 20  |6% entry from a |
000003d0  6c 69 73 74 20 6f 66 20  6e 75 6d 62 65 72 73 2e  |list of numbers.|
000003e0  0a 52 65 74 75 72 6e 73  20 74 68 65 20 76 61 6c  |.Returns the val|
000003f0  75 65 20 69 6e 20 72 61  6e 67 65 20 32 20 63 6f  |ue in range 2 co|
00000400  72 72 65 73 70 6f 6e 64  69 6e 67 20 74 6f 20 74  |rresponding to t|
00000410  68 65 20 70 6f 73 69 74  69 6f 6e 20 6f 66 20 25  |he position of %|
00000420  48 34 25 49 6e 70 75 74  31 25 48 34 25 20 69 6e  |H4%Input1%H4% in|
00000430  20 72 61 6e 67 65 20 31  2e 0a 41 73 20 66 6f 72  | range 1..As for|
00000440  20 4c 6f 6f 6b 75 70 2c  20 62 75 74 20 72 61 6e  | Lookup, but ran|
00000450  67 65 20 32 20 67 69 76  65 6e 20 61 73 20 61 20  |ge 2 given as a |
00000460  68 6f 72 69 7a 6f 6e 74  61 6c 20 6f 66 66 73 65  |horizontal offse|
00000470  74 20 28 25 48 34 25 49  6e 70 75 74 33 25 48 34  |t (%H4%Input3%H4|
00000480  25 29 20 66 72 6f 6d 20  72 61 6e 67 65 20 31 2e  |%) from range 1.|
00000490  0a 41 73 20 66 6f 72 20  4c 6f 6f 6b 75 70 2c 20  |.As for Lookup, |
000004a0  62 75 74 20 72 61 6e 67  65 20 32 20 67 69 76 65  |but range 2 give|
000004b0  6e 20 61 73 20 61 20 76  65 72 74 69 63 61 6c 20  |n as a vertical |
000004c0  6f 66 66 73 65 74 20 28  25 48 34 25 49 6e 70 75  |offset (%H4%Inpu|
000004d0  74 33 25 48 34 25 29 20  66 72 6f 6d 20 72 61 6e  |t3%H4%) from ran|
000004e0  67 65 20 31 2e 0a 52 65  74 75 72 6e 73 20 74 68  |ge 1..Returns th|
000004f0  65 20 76 61 6c 75 65 20  69 6e 20 74 68 65 20 72  |e value in the r|
00000500  61 6e 67 65 20 77 68 69  63 68 20 25 48 34 25 49  |ange which %H4%I|
00000510  6e 70 75 74 31 25 48 34  25 20 6d 61 74 63 68 65  |nput1%H4% matche|
00000520  73 2e 0a 52 65 74 75 72  6e 73 20 74 68 65 20 64  |s..Returns the d|
00000530  65 73 69 72 65 64 20 73  69 6e 67 6c 65 20 65 6c  |esired single el|
00000540  65 6d 65 6e 74 20 6f 72  20 73 75 62 61 72 72 61  |ement or subarra|
00000550  79 20 6f 66 20 61 6e 20  61 72 72 61 79 2e 0a     |y of an array..|
0000055f