Hi
Please help
I need to get a string based on a condition of another column. I tried using a formula didnt work
Description | Transaction Type |
DEPOSIT CASH $3038.10 CHEQUE $0.00 Branch EATON 6101 | Cash Deposit |
DEPOSIT CASH $664.20 CHEQUE $0.00 Branch DELORAINE 32701 | Cash Deposit |
DEPOSIT CASH $1168.55 CHEQUE $0.00 QuickCash BUSSELTON 37901 | Cash Deposit |
If the transaction type = Cash Deposit then please then from the Description column give me the string before the last number
essentially I should get
EATON
DELORAINE
BUSSELTON
etc
Thanks BS_THE_ANALYST - it worked however I just noticed that there could be two words between BRANCH or QUICKCASH . This happened to "ROCK CITY", it just threw CITY
Could you please assist
Regards
CT
Hi @cterrence
Try regex with this:
(?i)(?:Branch\s+|QuickCash\s+)(\S+)
Thank you @caltang -
Description | Transaction Type |
DEPOSIT CASH $3038.10 CHEQUE $0.00 Branch Rock City 6101 | Cash Deposit |
It worked for some....however when there are two words as the example above...it throws up only Rock. It should come as ROCK CITY
Thanks
CT
@cterrence Very well, I've made it even more dynamic:
(?i)(?:Branch|QuickCash)\s+([A-Za-z\s]+)\s+\d+
@cterrence if it helps, kindly mark my comment as the accepted solution so that others may find it more easily.
Thanks!