Hi Guys,
I really need help from a VBA expert, I have 2 sheets that need some comparison, but before the comparison I need to exclude some lines that contain certain values, I have created the following formula but as you can imagine, running this formula takes forever in a 6k records spread sheet:
{=IF(SUMPRODUCT(--(NOT(ISERR(SEARCH({" ","-"},A2)))))>0,"",IF(SUMPRODUCT(--(NOT(ISERR(SEARCH({"TV","Limited","Training","Trail","Loan","Test","Leaf","kiosk","no Scanning","Video training"},B2)))))>0,"",IF(MATCH(A2&C2,Sheet3!A:A&Sheet3!B:B,0),"Both",IF(MATCH(Sheet2!A2,Sheet3!A:A,0),"SN Only",IF(MATCH(Sheet2!C2,Sheet3!B:B,0),"HN Only","No Match")))))}
Besides that I am not getting validation for some part of the formula (marked in bold), below is an example of how my spreadsheets look like (not all columns are included only the ones I use for validation)
Sheet 1
<tbody>
</tbody>
Sheet 2
<tbody>
</tbody>
The exclusions are taken out of sheet 1:
From serial number column, if there is a space (one or more) or a dash, the line is excluded, formula stops
From System name column if any of the following words or phrases are found on any of the cells, the line is excluded:
Lab
Test
Trial
Loan
Leaf warehouse
Kiosk
Tv rooms
Loaner
No scanning
Test device
Video training
I would really appreciate if someone could help me with a VBA solution.
I really need help from a VBA expert, I have 2 sheets that need some comparison, but before the comparison I need to exclude some lines that contain certain values, I have created the following formula but as you can imagine, running this formula takes forever in a 6k records spread sheet:
{=IF(SUMPRODUCT(--(NOT(ISERR(SEARCH({" ","-"},A2)))))>0,"",IF(SUMPRODUCT(--(NOT(ISERR(SEARCH({"TV","Limited","Training","Trail","Loan","Test","Leaf","kiosk","no Scanning","Video training"},B2)))))>0,"",IF(MATCH(A2&C2,Sheet3!A:A&Sheet3!B:B,0),"Both",IF(MATCH(Sheet2!A2,Sheet3!A:A,0),"SN Only",IF(MATCH(Sheet2!C2,Sheet3!B:B,0),"HN Only","No Match")))))}
Besides that I am not getting validation for some part of the formula (marked in bold), below is an example of how my spreadsheets look like (not all columns are included only the ones I use for validation)
Sheet 1
A | B | C | D | ||||
1 |
<tbody> </tbody> |
<tbody> </tbody> | Computer Name | Validation | |||
2 |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | |||
3 |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | |||
4 |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | |||
5 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
6 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
7 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
8 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
9 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
10 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
11 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
12 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
13 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
14 |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | |||
15 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
16 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
17 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
18 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
19 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
20 |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | |||
21 |
<tbody> </tbody> |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | |||
22 |
<tbody> </tbody> | Kiosk |
<tbody> </tbody> | Formula goes here | |||
23 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
24 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
25 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
26 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
27 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here | ||||
28 |
<tbody> </tbody> |
<tbody> </tbody> | Formula goes here |
<tbody>
</tbody>
Sheet 2
A | B | |||
1 |
<tbody> </tbody> |
<tbody> </tbody> | ||
2 |
<tbody> </tbody> |
<tbody> </tbody> | ||
3 |
<tbody> </tbody> |
<tbody> </tbody> | ||
4 |
<tbody> </tbody> |
<tbody> </tbody> | ||
5 |
<tbody> </tbody> |
<tbody> </tbody> | ||
6 |
<tbody> </tbody> |
<tbody> </tbody> | ||
7 |
<tbody> </tbody> |
<tbody> </tbody> | ||
8 |
<tbody> </tbody> | |||
9 |
<tbody> </tbody> |
<tbody> </tbody> | ||
10 |
<tbody> </tbody> |
<tbody> </tbody> | ||
11 |
<tbody> </tbody> |
<tbody> </tbody> | ||
12 |
<tbody> </tbody> | |||
13 |
<tbody> </tbody> |
<tbody> </tbody> | ||
14 | ||||
15 | ||||
16 | ||||
17 | ||||
18 | ||||
19 | ||||
20 | ||||
21 | ||||
22 | ||||
23 | ||||
24 | ||||
25 |
<tbody>
</tbody>
The exclusions are taken out of sheet 1:
From serial number column, if there is a space (one or more) or a dash, the line is excluded, formula stops
From System name column if any of the following words or phrases are found on any of the cells, the line is excluded:
Lab
Test
Trial
Loan
Leaf warehouse
Kiosk
Tv rooms
Loaner
No scanning
Test device
Video training
I would really appreciate if someone could help me with a VBA solution.