0

I have pretty much zero experience with spreadsheets but I've got what I think is a simple task. I've been keep a log of how I spend my time. I've codified the language so I can easily grab the information for conditional formatting. I don't want to change the cell it's in because that will have other bits of information. So I'm using a custom formula to change the cells in column C. I searched around and found a formula in an article. I copied and pasted and altered what I thought I needed. I got it to work but the problem is it only catches the string of characters if they at the beginning of the text. I need to know how to get the string of text from anywhere in the cell for the other words to be input for other conditional cells.

Here is the formula I found:

 =REGEXMATCH($C3, "\AGeorge\s*([^\n\r]*)")

Here's how I altered it:

 =REGEXMATCH($B1, "\Aate\s*([^\n\r]*)")

Any help would be greatly appreciated and thanks in advance!

0

If you're a beginner, I'd skip REGEX formulas and go with something simpler like this:

=ISNUMBER(SEARCH(" ate"," "&$B1))

If you're wondering why the space before " ate" and appended to the beginning of the cell reference, it's to help assure that words that just happen to have "ate" in them don't cause a TRUE (e.g., "drank water" has "ate" in it, but it's not what you mean).

2
  • That's exactly what I needed. Thank you so much. I'm just not familiar enough with the formulas to know the best one for the job. – casual_loser Sep 25 '20 at 17:25
  • There are dozens of ways to structure a formula and get the same results. Functions are tools, but human brains still do the "art" of deciding how to use them. Since this satisfies your need, would you take a moment and mark my answer as "Best Answer"? It will signify in the main search list that your issue is resolved and that others no longer need to try to solve it. Thanks. – Erik Tyler Sep 26 '20 at 0:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.