dek
dek

Reputation: 75

If one cell IS NOT EMPTY put text on another cell in Google Sheets

I want to insert a text in a cell if another cell isn't empty. I have a dropdown list in column D. When a selection is made I want to add the text "Name Surname" to the opposite cell in column F.

I am sharing the Google Sheet sample file: https://docs.google.com/spreadsheets/d/1NhMP812BJRazPk9te_wTstoECCMW3TJpd7-8I7rkElI/edit?usp=sharing

Upvotes: 1

Views: 2110

Answers (1)

Viktor Dremov
Viktor Dremov

Reputation: 174

You can paste following formula in cell F4 and then copy it to other cells:

=IF(ISBLANK($D4); ""; "NAME SURNAME")

Breaking it down:

  • ISBLANK(cell) function checks if the cell is empty
  • IF(condition; value_if_true; value_if_false) returns the second or the third argument depending on if the condition holds true.
  • =IF(ISBLANK($D4); ""; "NAME SURNAME") when cell $D4 is empty, result is empty string. When $D4 is not empty, result is NAME SURNAME.

Upvotes: 2

Related Questions