I need to utilize vlookup as part of an excel formula and then count the entries in the cell of which the entries are separated by a space.
For example, in one worksheet tab, the reference cell is 12345, using vlookup to search a range (say a1:c8), when a match is found in column a, I then want to sum the number of entries separated by a space in the corresponding cell in column c (of which the contents are: 574 625 895) and the desired return result would be 3.
I know how to perform a similar test using an array formula to sum up the entire column as shown below but I am not sure how to tie in the vlookup so that I am only counting a single cell that I am requiring.
{=SUM(IF(LEN(TRIM(M2:M2281))=0,0,LEN(TRIM(M2:M2281))-LEN(SUBSTITUTE(M2:M2281," ",""))+1))}
Bookmarks