Re: Conditionally show zero or last two characters of text string

AllieExcel

Note the new title I've given your thread - in future threads try to be more precise in describing your thread, keeping in mind thread titles are used to search the forum. Accurate well-written titles return more relevant search results.

QuotePlease tell me what I am missing . . .

=IF(A24=RIGHT(A24,LEN(A24)-FIND("("-")OR(" ")",A24,1)),0,RIGHT(A24,2))

A24 will never be equal to a part of its data string. Example: if A24 contains "Yellow Submarine" it will never be equal to "marine" (assuming this the string portion returned from the RIGHT formula). The equal operator demands both sides of the equation be exactly the same.

The arguments in the OR function must evaluate to either true or false. This function could be nested in the IF statement, but only if you are testing for true or false conditions returned by the OR function.

Highly recommended: learn to use the formula evaluation tool in Excel. By stepping through formulas you can see how Excel evaluates each argument and the result that is returned. It is a great learning tool.

You should post either a sample workbook (dummy data) or give examples of the data strings along with the expected/desired results and explain your logic clearly.