I want to automatically create a text depending on what the other columns shows.
For example, if in A1 there is "Service", then G1='1'.
And if in B1 there is "True", then G1 = "11" (as in '1' + '1').

I hope this is understandable...

  • 1
    Please read how to and share a test sheet so as you can be easier helped. – marikamitsos May 13 at 12:51
  • Welcome. Please add a brief description of your search/research efforts as is suggested in How to Ask. – Rubén May 13 at 15:27
  • Have you tried the given solutions? Did any work for you? If not we should try finding out why. If yes, as per site guidelines when an answer addresses your question, you should accept it and even upvote it so others can benefit as well. – marikamitsos May 20 at 18:00

You can try this in G1:


It checks for Service with regexmatch as a condition
If true > 1
If false > nothing
Same idea with Truethen it concatenates the two values with &

| improve this answer | |

You mention:

...automatically create a text...
...if in A1 there is "Service", then G1='1'. And if in B1 there is "True", then G1 = "11" (as in '1' + '1')

You do not clarify what the result should be when A1 is not "Service".

So assuming that "if A1 is not Service" you only want A1 returned, you could use


Of course you can change -asd to whatever you like. Your result would be 1-asd or 1ABX or even 11, 1342 etc.
(You have to remember though that a result like 11 or 1324 will look like a number but will actually be text)

Functions used:

| improve this answer | |

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.