wildcarding text in IF statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Column A is a column of email subjects. Column B is a recipient of responded
to and forwarded emails. I am trying to determine which email subjects start
with RE:, Re:, FW: and Fw: so I can properly assign them to the recipient in
Column B.
A1's subject is "FYI"
A2's subject is "RE: FYI"
I've tried
=IF(A="RE:*",1,IF(A="Re:*",1, IF(A="FW:*",1,IF(A="Fw:*",1,""))))
I get no error messages, but I also get no result of a "1" in B1.
I'd appreciate any suggestions.
 
One way:

=SUM(COUNTIF(A1,{"Re:*","FW:*"}))

Which will return 1 or 0, or

=IF(SUM(COUNTIF(A1,{"Re:*","FW:*"}))>0,1,"")

If you want 1 or the null string
 
Both do work, thank you, but I realize one complication: If the recipient
only received some of the emails, where those cells have been input with an
"x", how do I return values on only the "x"'d cells?

Example:
A B
1 FYI X
2 RE: FYI
3 hello
4 re:hello X

3
4
 
Back
Top