Last Column With Data
Dim myRow as long
dim LastCol as long
myrow = 1243
with worksheets("SomeSheetnamehere")
lastcol = .cells(myrow,.columns.count).end(xltoleft).column
end with
msgbox LastCol
This will break if you've used the last column in that row -- or if you haven't
used any cells in that row.
Is that a problem?
Bishop wrote:
How do I check a certain row to find out the last column in the row that has
data?
--
Dave Peterson
|