i’m trying to get the value of one cell in a column (column B). this cell is in the same row as the last cell which has a value in another (column A)
maxrowina = ws.Range("A1").Offset(ws.Rows.Count - 1, 0).End(xlUp).Row
maxcellinb = "B" & str(maxrowina)
MsgBox (ws.Range(dbhobcell).Value)
but i keep on getting a runtime error: 91.
how can i do this?
Two things 🙂
1) You don’t need str(maxrowina). You can use this
2) Shouldn’t MsgBox (ws.Range(dbhobcell).Value) be
Complete Code