Hi,
I would like a VBA code (not excel formula) that looks at text in a range e.g. range(B4:B8) and then looks at how many times this text is found in another range e.g. range(D4:D20).
So if in range(B4:B8) we have 3 words i.e. Apple, Pear and Cherry and in range(D4:D20) we have 3 times Apple, 2 times Pear and 1 time Cherry then the final result should be 6.
I know we can do this with a Pivot table (or adding COUNTIF) but because the data changes every day (i.e. daily data extract) I would need to rebuild/ repoint my Pivot table/excel formula every day whereas the VBA code would run on new sheet and would require no intervention (as new sheets have same name as old ones).
Let me know if VBA code is easy to create.
Thanks,
Nic
I would like a VBA code (not excel formula) that looks at text in a range e.g. range(B4:B8) and then looks at how many times this text is found in another range e.g. range(D4:D20).
So if in range(B4:B8) we have 3 words i.e. Apple, Pear and Cherry and in range(D4:D20) we have 3 times Apple, 2 times Pear and 1 time Cherry then the final result should be 6.
I know we can do this with a Pivot table (or adding COUNTIF) but because the data changes every day (i.e. daily data extract) I would need to rebuild/ repoint my Pivot table/excel formula every day whereas the VBA code would run on new sheet and would require no intervention (as new sheets have same name as old ones).
Let me know if VBA code is easy to create.
Thanks,
Nic