Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"