ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Go to 2nd row below last row (https://www.excelbanter.com/excel-programming/350250-go-2nd-row-below-last-row.html)

Nigel

Go to 2nd row below last row
 
I am able to determine the last row in a spreadsheet and go to it using
ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Select,

what I want to be able to do is move 2 rows down and then in column A on
that row put the word line and column B put the word Ind.

Hope someone can help

Thanks

Toppers

Go to 2nd row below last row
 
Nigel,

ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Select
ActiveCell.Offset(2, -1) = "Line"
ActiveCell.Offset(2, 0) = "Ind"

HTH

"Nigel" wrote:

I am able to determine the last row in a spreadsheet and go to it using
ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Select,

what I want to be able to do is move 2 rows down and then in column A on
that row put the word line and column B put the word Ind.

Hope someone can help

Thanks


JE McGimpsey

Go to 2nd row below last row
 
One way:

With ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Offset(2, -1)
.Value = "line"
.Offset(0, 1).Value = "Ind"
End With

Note that it's almost never necessary to select a range in order to use
it.

In article ,
"Nigel" wrote:

I am able to determine the last row in a spreadsheet and go to it using
ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Select,

what I want to be able to do is move 2 rows down and then in column A on
that row put the word line and column B put the word Ind.

Hope someone can help

Thanks



All times are GMT +1. The time now is 12:32 AM.

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