excelexcel-formula

Find the minimum value of a range based on presence of a substring in another range


My dataset has series of columns with the pattern

I need to aggregate the results by tag for each row - for example, the lowest-number response for all questions in the row tagged with B.

Have been asked to do this in Excel on a mac - normally I would do it in R but that's not going to work this time.

Thanks for any guidance!

Edited to add:

enter image description here

Didn't realize I could drop an image here. So, for example, I would like to be able to see that for questions tagged C, the low response was "2".


Solution

  • If you're just looking for a quick and dirty, one-off solution, you could just drop in some helper formulas to the right of the actual data. You'd have one per target tag, ex. =IF(ISERROR(SEARCH("A",A2)), "", 1)

    Just adjust the target cells and search values and then you'll have a 1 in the row if it contains the target flag, and the sum of that column is the # of rows with the target flag. To enable getting the lowest response # with a flag swap the 1 with the response # (wherever that is) and then the MIN of the column will be what 're looking for (and the MAX would be largest response #, COUNT would get the # of responses with the tag).