Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need to add a copied line to 1st blank row via a macro

I am working on a Worksheet with several sheets. In the first one, I have a
series of lines that I need to copy to each of the other sheets, based on the
line.

The select criteria is no problem.

The problem is that I need to find out how to find the first blank row on
each of the sheets and paste the line for that sheet there. This is needed
to be done via a macro.

I know you can use ctr down down to get to the last line. However the macro
stores that exact cell as the range.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default Need to add a copied line to 1st blank row via a macro

Does not consider row 1 if open or test for whether you have hit the
bottom of your sheet. This can be modified if needed.

Sub GetNextCell_row()
Dim Nextrow As Long
Nextrow = ActiveCell.SpecialCells(xlLastCell).Offset(1, 0).Row
MsgBox "Next open row = " & Nextrow
End Sub


hjyoungii wrote:
I am working on a Worksheet with several sheets. In the first one, I have a
series of lines that I need to copy to each of the other sheets, based on the
line.

The select criteria is no problem.

The problem is that I need to find out how to find the first blank row on
each of the sheets and paste the line for that sheet there. This is needed
to be done via a macro.

I know you can use ctr down down to get to the last line. However the macro
stores that exact cell as the range.


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to insert blank line when lines sum to zero TCoats Excel Discussion (Misc queries) 0 July 2nd 07 05:08 PM
macro change at each blank line Somewhat_blonde New Users to Excel 1 January 23rd 07 05:09 AM
how do I write macro to sum numbers up to next blank line? Art Nittskoff Excel Discussion (Misc queries) 2 January 2nd 07 04:56 PM
Insert blank line macro laidebug Excel Worksheet Functions 1 April 14th 06 11:56 PM
Macro to exclude blank line and total column Janmy Excel Programming 2 March 3rd 04 12:02 PM


All times are GMT +1. The time now is 10:37 PM.

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

About Us

"It's about Microsoft Excel"