excelexcel-formulavlookupexcel-match

Lookup and Append data in Excel Single Column


With reference to below screenshot, Column A,B data are constant and unique values entire column range. Column C data is depends on Column E & F. Column E , F are logs data copies from table and paste in to excel in same sheet. The logs contains "VID,Error_Description" columns data. Each VID may have one or more errors or dont have any errors also. Ex:(As per image) VID-1 ( 400 bad request,500 Internal Server). The column range of E & F are unlimited

So I would like to match each VID in Column E with Column A and fetch corresponding Column E error description in Column F and add to "Result" (Column C). Ex:VID-6: 202 Accepted(in Column E & F ) , so Column C Result for "VID-6" filled with 200 Accepted

If more error description is found for same VID in Column E, then those error description should be appended with comma separator. Ex: VID-1 result is 400 Bad Request,500 Internal Server which is appended with comma seperator

If in Column E does not have any VID that exists in Column A, then specific VID result should be '200 OK'. Ex: There is no VID-7,VID-4,VID-5 in column E, so "result" (Column C) should be filled with "200 OK"

I tried with VLOOKUP formulae but i am not getting proper result.

Input: Column E & Column F

Output: Column C "Result"

Excel Reference Screenshot


Solution

  • Try =IFERROR(TEXTJOIN(", ", TRUE, FILTER($F$2:$F$7, $E$2:$E$7=$A2)), "200 OK")