hi
not with a fomula. formulas return values to the cell in which they reside.
they can not perform actions such as underline data in another cell.
you might have better luck with conditional formating.
high light the row or as much of it as you wish. i recomend just the data
and not the entire row.
formula is.......=$A$1<>$A$2......format font underline.