Search code examples
excelexcel-formulasumifs

Excel- Sum groups of similar cell contents using wildcards


I am trying to sum the amounts in column B based on the types of symbols in column A. Any symbol with "EW" at the start needs to be grouped and by date month - see column D. The second symbol comes in two formats but also needs to be grouped, so "OES" and "OMSX" needs to be grouped together and with their date month. I know I need wildcards here but I cannot get this to work.

EDIT, correct EW, accidentally had "EWS" before, apologies to anyone who responded

enter image description here


Solution

  • Thius should work if you can get your data corrected.

    =SUMIFS(B:B, A:A, REPLACE(D2, FIND(" ", D2), LEN(D2), "*"), A:A, REPLACE(D2, 1, FIND(" ", D2), "*")&"*")