Forum Discussion

markzullig's avatar
markzullig
Copper Contributor
Aug 23, 2024
Solved

How to put formatted text in one cell when another cell value is blank

How to put formatted text in one cell when another cell value is blank.     In one column I have phone numbers.  For the cells that don't have a phone number (G1), I want another cell in the next c...
  • PeterBartholomew1's avatar
    Aug 23, 2024

    markzullig 

    You can test whether the phone number is present using

    = IF(ISNUMBER(phone), "", "Record not clean")

    Using modern Excel, a more precise test might be

    = IF(REGEXTEST(phone, "^\d{10}|\d{7}$"), "", "Record not clean")

    which requires 7 or 10 digit numbers.

     

Resources