Hi,
I'm looking for a macro that will - based on a selection - list all items that satisfy 2 criteria.
Basically there are 2 pick lists (one for fiscal year; one for province), which the user will select, and based on that, I would like all the codes for the chosen year and province to be listed.
Is that possible? Any help is really appreciated!!
Manon
TAB 1
Is the source with all the information:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]FY[/TD]
[TD]PROV[/TD]
[TD]CODE[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]15-16[/TD]
[TD]ON[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]15-16[/TD]
[TD]ON[/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]15-16[/TD]
[TD]AB[/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]15-16[/TD]
[TD]AB[/TD]
[TD]6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]15-16[/TD]
[TD]SK[/TD]
[TD]4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]15-16[/TD]
[TD]BC[/TD]
[TD]7[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]16-17[/TD]
[TD]ON[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]16-17[/TD]
[TD]ON[/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]16-17[/TD]
[TD]ON[/TD]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]16-17[/TD]
[TD]AB[/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]16-17[/TD]
[TD]AB[/TD]
[TD]6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]16-17[/TD]
[TD]SK[/TD]
[TD]4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]16-17[/TD]
[TD]BC[/TD]
[TD]7[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]17-18[/TD]
[TD]ON[/TD]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD]17-18[/TD]
[TD]SK[/TD]
[TD]4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]17[/TD]
[TD]17-18[/TD]
[TD]BC[/TD]
[TD]7[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Notes*
- e.g. there are 2 values in ON in the first year, 3 in the second year, and 1 in the last year.
TAB 2
This is the results tab:
[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Pick FY:[/TD]
[TD](pick list)[/TD]
[TD]Pick Prov.[/TD]
[TD](pick list)[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Province[/TD]
[TD]Code[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD]List here[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I'm looking for the macro to list, starting in C4, and based on the items picked in C1 and E1, the codes for the chosen year and province.
So let's say we stick with ON:
If the user selects "15-16", we would have 2 results
C5 = 1, C6 = 2
If the user selects "16-17", we would have 3 results
C5 = 1, C6 = 2, C7 = 3
If the user selects "17-18", we would have 1 results
C5 = 3
A very big thank you in advance!!
Manon
I'm looking for a macro that will - based on a selection - list all items that satisfy 2 criteria.
Basically there are 2 pick lists (one for fiscal year; one for province), which the user will select, and based on that, I would like all the codes for the chosen year and province to be listed.
Is that possible? Any help is really appreciated!!

Manon
TAB 1
Is the source with all the information:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]FY[/TD]
[TD]PROV[/TD]
[TD]CODE[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]15-16[/TD]
[TD]ON[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]15-16[/TD]
[TD]ON[/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]15-16[/TD]
[TD]AB[/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]15-16[/TD]
[TD]AB[/TD]
[TD]6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]15-16[/TD]
[TD]SK[/TD]
[TD]4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]15-16[/TD]
[TD]BC[/TD]
[TD]7[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]16-17[/TD]
[TD]ON[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]16-17[/TD]
[TD]ON[/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]16-17[/TD]
[TD]ON[/TD]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]16-17[/TD]
[TD]AB[/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]16-17[/TD]
[TD]AB[/TD]
[TD]6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]16-17[/TD]
[TD]SK[/TD]
[TD]4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]16-17[/TD]
[TD]BC[/TD]
[TD]7[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]17-18[/TD]
[TD]ON[/TD]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD]17-18[/TD]
[TD]SK[/TD]
[TD]4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]17[/TD]
[TD]17-18[/TD]
[TD]BC[/TD]
[TD]7[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Notes*
- e.g. there are 2 values in ON in the first year, 3 in the second year, and 1 in the last year.
TAB 2
This is the results tab:
[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Pick FY:[/TD]
[TD](pick list)[/TD]
[TD]Pick Prov.[/TD]
[TD](pick list)[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Province[/TD]
[TD]Code[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD]List here[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I'm looking for the macro to list, starting in C4, and based on the items picked in C1 and E1, the codes for the chosen year and province.
So let's say we stick with ON:
If the user selects "15-16", we would have 2 results
C5 = 1, C6 = 2
If the user selects "16-17", we would have 3 results
C5 = 1, C6 = 2, C7 = 3
If the user selects "17-18", we would have 1 results
C5 = 3
A very big thank you in advance!!
Manon