Forum Discussion

itsMonty's avatar
itsMonty
Copper Contributor
Oct 08, 2024

Is there a way to get a cell to show alternate text based off deliberate characters found in a cell?

Hello, Is there a formula that will either place "Discount" or "Received" in a cell if another cell contains the characters "%" or "-" in it respectively.    I have enclosed a image to better demon...
  • m_tarler's avatar
    Oct 08, 2024
    try
    =IFS(ISNUMBER(SEARCH("%",A1)),"Discount",ISNUMBER(SEARCH("-",A1)),"Received",1,"")
    if you have an older version of excel and IFS() doesn't work then:
    =IF(ISNUMBER(SEARCH("%",A1)),"Discount",IF(ISNUMBER(SEARCH("-",A1)),"Received",""))

Resources