Find a carriage return in a cell

  • Thread starter Thread starter VW
  • Start date Start date
V

VW

Can you let me know if there is a way to FIND a cell that
contains a carriage return ? It is displayed as a square
in the cell in Ms Excel.
 
Maybe CHAR(10) ?
(carriage return via Alt + Enter)

Assume you want to check range A1:C10 in Sheet1
for cells with carriage return

In a new Sheet2:

Put in A1: =IF(ISERROR(SEARCH(CHAR(10),A1)),"","Yes")

Copy A1 across to C1, then down to C10
to cover the same range as in Sheet1

A1:C10 in Sheet2 will return "Yes" for corresponding
cells with carriage returns in range A1:C10 in Sheet1
 
Sorry, pasted the "wrong" formula

Line:
Put in A1: =IF(ISERROR(SEARCH(CHAR(10),A1)),"","Yes")

should read:

Put in A1 :=IF(ISERROR(SEARCH(CHAR(10),Sheet1!A1)),"","Yes")
 
Thanks Max for the solution. It works.
-----Original Message-----
Sorry, pasted the "wrong" formula

Line:

should read:

Put in A1 :=IF(ISERROR(SEARCH(CHAR(10),Sheet1! A1)),"","Yes")
 
Back
Top