but only when data is entered in the row
This is rather vague, but I'll make the same assumption as WarPigl3t & Rick that this really just means look in column B on that row, not right across the whole row.
Yet another suggestion. A2, copied down
=IF(B2="","",COUNT(A$1:A1)+1)
The reason I'm making another suggestion is that, depending on your circumstances, the other suggestions may give incorrect results.
Post #2:
- If there are any blanks in the column B data, the numbering will skip.
- If subsequently any rows are added at the top of the sheet, the numbering will not start with 1
Post #3
- If there is any numerical data in column B, or any other columns to the right, incorrect numbering will almost certainly result.