ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   type mismatch (https://www.excelbanter.com/excel-programming/336136-type-mismatch.html)

John

type mismatch
 
i get a type mismatch error in the following line; rw2 =
Sheets("NI").Range("A9").End(xlDown) + 1

any ideas?

Dave Peterson

type mismatch
 
I bet you want the row number:

rw2 = Sheets("NI").Range("A9").End(xlDown).row + 1

If you leave off .row, then excel assumes you want the .value (and who knows
what that might be).



John wrote:

i get a type mismatch error in the following line; rw2 =
Sheets("NI").Range("A9").End(xlDown) + 1

any ideas?


--

Dave Peterson

John

type mismatch
 
thanks dave

"Dave Peterson" wrote:

I bet you want the row number:

rw2 = Sheets("NI").Range("A9").End(xlDown).row + 1

If you leave off .row, then excel assumes you want the .value (and who knows
what that might be).



John wrote:

i get a type mismatch error in the following line; rw2 =
Sheets("NI").Range("A9").End(xlDown) + 1

any ideas?


--

Dave Peterson



All times are GMT +1. The time now is 02:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com