Google-sheets – In google sheets, want to copy cell values from 1 sheet to another if a specific cell has any text

formulasgoogle sheets

I have this working well:

=if('Lee''s sheet'!$AP2="x",'Lee''s sheet'!B2,"")

which will populate cell values into a cell, from 1 sheet to another if there is an "X" marked in column AP.

I want to run the same formula but if ANY text or number is AP column (as opposed to just an X)

Best Answer

Test for the length of the cell contents; it is is greater than zero, then B2, else ""

The specific sheet reference is untested, but taken from your example.

=if(len('Lee''s sheet'!$AP2)>0,'Lee''s sheet'!B2,"")