I have an Excel 2007 spreadsheet populated with four columns (V1 V2, V3 V4) that contain values (integers [0-20]) separated by a comma. Values need not be continuous.

I would like to create a new column (e.g. newV) whose cells only contains an integer if it is included in at least two of the previous four columns from that row. Can this be done with a formula or macro within Excel? If so what would be a good way to approach this? Thank you.
I have an Excel 2007 spreadsheet populated with four columns (V1 V2, V3 V4)
Share
If each value can only appear once in each cell:
Usage:
EDIT: if you’re having problems trouble-shooting a UDF then it is often easier to debug the issue using a sub