Hi All,
I was hoping that someone could please help me with some VBA code to automate a process.
I have 2 pages in my spread sheet the first looks like this:
The second contains the below categories.
I'd like to automate the process so the information in sheet 1 is compared to the matrix in sheet 2 and on a third page the Id number is listed with the applicable code.
i.e
In the example of ID 669972 they are a type 1 their age is 59 and they are a N category their score is 3 therefore ID. 669972 = Code 130
In the example of ID 393838 they are a type 1 their age is 65 their category is Y and their score is 2 = ID 393838 Code 136
I'd really appreciate assistance it would make my work life so much easier.
Thanks
I was hoping that someone could please help me with some VBA code to automate a process.
I have 2 pages in my spread sheet the first looks like this:
A2 | B2 | C2 | D2 | E2 |
ID. | Type | AGE | Category | Score |
669972 | 1 | 59 | N | 3 |
132125 | 5 | 24 | Y | 9 |
151515 | 1 | 31 | N | 3 |
393838 | 1 | 65 | Y | 56 |
787897 | 3 | 23 | Y | 2 |
The second contains the below categories.
I'd like to automate the process so the information in sheet 1 is compared to the matrix in sheet 2 and on a third page the Id number is listed with the applicable code.
i.e
In the example of ID 669972 they are a type 1 their age is 59 and they are a N category their score is 3 therefore ID. 669972 = Code 130
In the example of ID 393838 they are a type 1 their age is 65 their category is Y and their score is 2 = ID 393838 Code 136
A2 | B2 | C2 | D2 | E2 |
Type | Age | Category | Score | Code |
5 | 0-17 | Y | 123 | |
5 | 18-64 | Y | 124 | |
5 | 65+ | Y | 125 | |
1 | 0-17 | Y | >17 | 126 |
1 | 0-17 | Y | <17 | 127 |
1 | 0-17 | Y | 0 | 128 |
1 | 18-64 | N | >14 | 129 |
1 | 18-64 | N | <14 | 130 |
1 | 18-64 | N | 0 | 131 |
1 | 18-64 | Y | >14 | 132 |
1 | 18-64 | Y | <14 | 133 |
1 | 18-64 | Y | 0 | 134 |
1 | 65+ | Y | >15 | 135 |
1 | 65+ | Y | <15 | 136 |
1 | 65+ | Y | 0 | 137 |
2 | 0-17 | Y | >12 | 138 |
2 | 0-17 | Y | <12 | 139 |
2 | 0-17 | Y | 0 | 140 |
2 | 18-64 | Y | >10 | 141 |
2 | 18-64 | Y | <10 | 142 |
2 | 18-64 | Y | 0 | 143 |
2 | 65+ | Y | >11 | 144 |
2 | 65+ | Y | <11 | 145 |
2 | 65+ | Y | 0 | 146 |
3 | 0-17 | Y | >12 | 147 |
3 | 0-17 | Y | <12 | 148 |
3 | 0-17 | Y | 0 | 149 |
3 | 18-64 | Y | >11 | 150 |
3 | 18-64 | Y | <11 | 151 |
3 | 18-64 | Y | 0 | 152 |
3 | 65+ | Y | >11 | 153 |
3 | 65+ | Y | <11 | 154 |
3 | 65+ | Y | 0 | 155 |
4 | 0-17 | Y | >9 | 156 |
4 | 0-17 | Y | <9 | 157 |
4 | 0-17 | Y | 0 | 158 |
4 | 18-64 | Y | >8 | 159 |
4 | 18-64 | Y | <8 | 160 |
4 | 18-64 | Y | 0 | 161 |
4 | 65+ | Y | >9 | 162 |
4 | 65+ | Y | <8 | 163 |
4 | 65+ | Y | 0 | 164 |
9 | 0-17 | Y | 0 | 165 |
9 | 18-64 | Y | 0 | 166 |
9 | 65+ | Y | 0 | 167 |
I'd really appreciate assistance it would make my work life so much easier.
Thanks