Hello guys,
I am struggling with a formula, I cannot think of a way to create it in a way where it doesn't need any further manual intervention.
Tried with a pivot table but I can't seem to make GETPIVOTDATA to work.
Can you please help me out?
I have a database with Ref number/ week number / country / number
<tbody>
</tbody>
So I can have multiple countries with multiple ref numbers and in different weeks and on column D I can have only 12 or -12.
<tbody>
</tbody>
The Idea is to get a count based on week number how many ref numbers are in a recurrence in the following weeks. (E.G. Table 1 Cell B2 is in week 26 and it has a recurrence in week 27 also but in week 28 ref number 123 doesn't show up anymore so that's why it is 0 in table 2 cell D2.
In table 2 Cell B2,C3,D4 shows how many ref numbers do we have new in that week.
Can I get a formula that applies to Table 2 based on Table 1 database considering that I will need the formula to expand to week 52 on rows and columns and everything is based on country level?
Right now I am doing a formula with countifs(Table1!A:A,Table2!A1,Table1!C:C,Table2!B1,Table1!C:C,Table2!,C1) This is the formula for table 2 cell C2 and for further weeks I need to keep adding ,Table2!,D1 // ,Table2!,E1 and so on.
Thank you.
Razvan
I am struggling with a formula, I cannot think of a way to create it in a way where it doesn't need any further manual intervention.
Tried with a pivot table but I can't seem to make GETPIVOTDATA to work.
Can you please help me out?
I have a database with Ref number/ week number / country / number
Table-1 | A | B | C | D |
1 | Country | Ref Number | Week Number | # |
2 | UK | 123 | W26 | 12 |
3 | Germany | 445 | W26 | -12 |
4 | UK | 123 | W27 | 12 |
5 | Netherlands | 555 | W27 | -12 |
6 | UK | 342 | W28 | 12 |
<tbody>
</tbody>
So I can have multiple countries with multiple ref numbers and in different weeks and on column D I can have only 12 or -12.
Table-2 | A | B | C | D |
1 | UK | W26 | W27 | W28 |
2 | W26 | 1 | 1 | 0 |
3 | W27 | 1 | 0 | |
4 | W28 | 1 |
<tbody>
</tbody>
The Idea is to get a count based on week number how many ref numbers are in a recurrence in the following weeks. (E.G. Table 1 Cell B2 is in week 26 and it has a recurrence in week 27 also but in week 28 ref number 123 doesn't show up anymore so that's why it is 0 in table 2 cell D2.
In table 2 Cell B2,C3,D4 shows how many ref numbers do we have new in that week.
Can I get a formula that applies to Table 2 based on Table 1 database considering that I will need the formula to expand to week 52 on rows and columns and everything is based on country level?
Right now I am doing a formula with countifs(Table1!A:A,Table2!A1,Table1!C:C,Table2!B1,Table1!C:C,Table2!,C1) This is the formula for table 2 cell C2 and for further weeks I need to keep adding ,Table2!,D1 // ,Table2!,E1 and so on.
Thank you.
Razvan