I'm not sure if it's heresy to ask about Google Sheets here, but I have a wildcard lookup question and figured you all are the most reliable source. I'm helping out a friend whose organization uses Google Sheets (the reason I can't just solve this in Excel).
In this scenario, dates on a calendar are the lookup values (e.g. 9/1/2014). On another sheet, I want to either return a value corresponding to either "9/1/2014" or "9/1/2014 pm" in an adjacent cell (only one or the other will ever be represented). One other variable to consider is that there are sometimes trailing spaces or different numbers of spaces between the date and the "pm". In Excel, I would do something like =INDEX(Sheet2!C:C,MATCH(A2&"*pm*",Sheet2!A:A,0)).
However, I've read that Google Sheets doesn't support wildcards in the same way as Excel. People recommend some combination of FILTER and SEARCH, which are totally foreign to me. I used to following workaround, but wondering if others have more flexible solutions that will take variations of the lookup value into account:
=IFERROR(IFERROR(INDEX(Sheet2!$E:$E,MATCH(E3&" pm",Sheet2!$B:$B,0)),INDEX(Sheet2!$E:$E,MATCH(E3,Sheet2!$B:$B,0))),"")
Thanks in advance!
In this scenario, dates on a calendar are the lookup values (e.g. 9/1/2014). On another sheet, I want to either return a value corresponding to either "9/1/2014" or "9/1/2014 pm" in an adjacent cell (only one or the other will ever be represented). One other variable to consider is that there are sometimes trailing spaces or different numbers of spaces between the date and the "pm". In Excel, I would do something like =INDEX(Sheet2!C:C,MATCH(A2&"*pm*",Sheet2!A:A,0)).
However, I've read that Google Sheets doesn't support wildcards in the same way as Excel. People recommend some combination of FILTER and SEARCH, which are totally foreign to me. I used to following workaround, but wondering if others have more flexible solutions that will take variations of the lookup value into account:
=IFERROR(IFERROR(INDEX(Sheet2!$E:$E,MATCH(E3&" pm",Sheet2!$B:$B,0)),INDEX(Sheet2!$E:$E,MATCH(E3,Sheet2!$B:$B,0))),"")
Thanks in advance!