=TRIM(A1)
=TRIM(CLEAN(A1))
=TRIM(CLEAN(SUBSTITUTE(A1,CHAR(160)," ")))
=TRIM(A1)
=TRIM(CLEAN(A1))
=TRIM(CLEAN(SUBSTITUTE(A1,CHAR(160)," ")))
If you want to find first EMPTY column in row, then use this formula into (column I) to find the index of the empty column (see column I).
#N/A means there is no column , like row 3
=MATCH(TRUE,INDEX(A3:G3="",0),0)
| apple | 1 |
| apple | 2 |
| apple | 3 |
| mango | 1 |
| mango | 2 |
| coco | 1 |
| coco | 2 |
| coco | 3 |
| coco | 4 |
| vanila | 1 |
| vanila | 2 |
=IF(B10<>B9,1,C9+1)or
=COUNTIF($A$2:A2,A2)