简体   繁体   中英

Excel Formula to replace conditionally at the end of a cell

Trying to do a mass replace o of cells only ending in " A" in a data set. This keeps coming up value error

=IF(RIGHT(A1,2)=" A",REPLACE(" A", RIGHT(A1, 1),2, " Away"), "not recognized")

Skip the replace:

=IF(RIGHT(A1,2)=" A", A1 & "way", "not recognized")

If you really want to use it:

=IF(RIGHT(A1,2)=" A",REPLACE(A1,LEN(A1)-1,2," Away"), "not recognized")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM