summaryrefslogtreecommitdiffstats
path: root/test/20-table-reference-01.txt
blob: 0e99185865cabe8dcf0e56c9407500c8db725cd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
%% Basic table reference test.  Set C3:D9 to be a table range with 2 columns
%% 'Category' and 'Value'.
%mode init
C3@Category
C4@A
C5@B
C6@C
C7@D
C8@E
C9@Total
D3@Value
D4:1
D5:2
D6:3
D7:4
D8:5
D9=SUBTOTAL(109,[Value])
E1=SUM(Table1[Value])
E2=COUNTA(Table1[#Headers])
E3=COUNTA(Table1[[#Headers],[Category]])
E4=COUNTA(Table1[[#Headers],[#Data],[Category]])
%mode table
name=Table1
range=C3:D9
columns=Category,Value
totals-row-count=1
%push
%calc
%mode result
D9=15
E1=15
E2=2
E3=1
E4=6
%check
%exit