Reputation: 9
I'm working with a fairly large data set, I have a list of names which appear more than once in column B and in column C i have the team they are part of.
In column C which displays there team name most the data is there but I do have a few 1000 where no team name is not present. Is excel smart enough to go for example Jamie@soso is part of design because it case in "B36" "C36" and then assign design to the missing field?
Here is an example of the data with the missing team names
And here is a view with what im looking for end result wise.
If I need to explain this better please let me know and thank you in advance.
Upvotes: 0
Views: 453
Reputation: 471
To do without VBA, add a helper column in column C and insert this array formula:
{=INDEX($B$1:$B$17,MATCH(A1 & "?*",$A$1:$A$17&$B$1:$B$17,0))}
To create an array formula, type in the formula without the curly brackets, then press CTRL+SHFT+ENTER. Excel will add the curly brackets.
When you have your column C results, you can copy and paste values to overwrite column B if you want to get rid of your helper column.
This formula looks for rows with a value in A that matches the current row (i.e. same name), and any value in B that isn't blank; "?*" ensures at least one character. The match look up value is therefore A & non-blank B, and the array it's looking in is both A column range and B column range. The INDEX part provides the value from column B if it exists.
Names with no matching column B already completed will give you #N/A so you can manually enter those.
Upvotes: 0
Reputation: 35915
On the assumption that there are no ambiguous entries, you could do the following:
If you want this exercise to be repeatable, you could also use Power Query. Load the data into the Power Query editor, sort by name (ascending) and team (descending), select the Team column and click Transform > Fill > Fill down. The screenshot shows the result
Upvotes: 2