我有一个公式来查看列表,如果它包含特定的字符串,请在其旁边添加单元格。
Cell D5 = "String1" 'for example
=SUMIF($A$4:$A$250,"*- "&D5&"*",$C$4:$C$250)
我遇到的问题是,当我搜索“ -String1 ”时,有时我正在搜索多个字符串-例如:
使用上面的公式,它将为每个string1,string2和string4单元格添加300,并为string1和string3都添加400
我正在寻找的公式是搜索“ -string? ”并按其旁边的单元格除以“ *-*”