2

I'm so close to getting it. I've tried a couple things. My wheelhouse is python. Unfortunately Excel is not my forte.

=IF(OR(U2=(U3:U32)),"T"&U2,U2)

First attempt.
If U2 is in U3:U32, put a T in front of U2, else U2.

=IF(OR(countif(U3:U32,U2)),"T"&U2,U2)

Second attempt.
Trying to compare all the other numbers using countif to U2, if U2 exists in U3:U32, put a T in front of U2, else U2 itself.

Any quick solutions out there?

  • Welcome. Can you please share a link to a test sheet with expected results? It would be great help. – marikamitsos Sep 20 at 2:07
1

This formula takes a range containing strings or numbers and returns an output that has "T" prepended whenever an element occurs more than once. This is my understanding of the question: =IF(COUNTIF(A$2:A$11,A2)>1,"T"&A2,A2)

If you want to have the input replaced itself automatically, you have to work with a script that triggers on edit.

Solution

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.