I'd like to insert a count search function into a cell and make it dynamic using VBA.
In the cell G2 I want to insert the following formula: =COUNT(SEARCH(($F$2:$F$3;B2))=0 so that it returns a true or false value. As the Table in cell A1 and the column F are liable to change I need to create a code that would insert a dynamic count search function in there.
This is the code I've inserted and I've tried to highlight the code from cell F2 and below but it doesn't seem to work.
ActiveCell.Formula2R1C1 = "=COUNT(SEARCH(Range."F2".Currentregion,RC[-5]))=0"
Anyone know how I can edit the code so that it looks looks up the region below F2 dynamically and creates an absolute value and also creqtes B2 a relative reference (appears to be currently RC[-5] in the code ?
Thanks,