Hi Amr,
Sorry I misread your request, Don Guillett providef the answer you were
looking for with a array formula to get the value of the last cell in a row.
But you or others may make use of my mistaken reading to locate
the cursor to the next empty cell to the right of the last used cell on a row.
I use a macro to go to the top of a column and one to go the bottom
of a column, which you can see on toolbars.htm page.
A few modifications and you have a macro to go
to the rightmost cell with data (or formulas). Have added OFFSET so
you go the empty cell to the right. You want to use a shortcut key or
a toolbar button, you can edit an arrow button and change the colors.
Sub GotoRightOfCurrentRow() 'D.McRitchie, 2003-12-08, misc, based on Tom Ogilvy
Cells(ActiveCell.Row, Columns.Count).End(xlToLeft).Offset(0, 1).Select
End Sub
Similar macros are
'Documented in
http://www.mvps.org/dmcritchie/excel/toolbars.htm
'Coding:
http://www.mvps.org/dmcritchie/excel/code/gotostuff.txt