2

Table for counting items:

ID  COUNT
1   10
2   0
3   12
4   1
5   5
6   10
7   9
8   9
9   11
10  0

Table-pedia with info about items:

ID  NAME    FEAT1  FEAT2
1   Nanan   R      20
2   Meowth  S      0
3   Nanan   R      13
4   Nanan   R      12
5   Uaua    L      20
6   Bobz    R      0
7   Lawkz   S      2
8   Ughtht  L      1
9   Ughtht  L      444
...

Table three:

NAME    FEAT1  COUNT
Nanan   R      23
Ughtht  L      20
Uaua    L      5
...

Question is about table 3: how to make a database function that will create it? (ID cell in tables 1 & 2 is just the key to connect them.)

Unique item NAME (Table 2), FEAT1 of the item (Table 2), my COUNT of item same name (Table 1).

How do I make a relation which will check what IDs are shared by same NAME (Table 2) and then take those ID and sum their COUNT from Table 1?

0

2 Answers 2

2

Both copied down might suit:

In A1: =unique(_NAME),
in C1: =sumif(_NAME,A1,_COUNT)

1

First, use a vlookup function to put data from table 1 alongside table 2. Something like

G2 = vlookup(D2, A1:B9999, 2, 0)`

Then insert a pivot table with rows of NAME and FEAT1, and value SUM of count.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.