Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default Next blank cell

I am copying and pasting i need code to paste frm the next blank cell in
column N.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Next blank cell


You could use


Code:
--------------------
Dim lastRow As Long
lastRow = ActiveSheet.Cells(Rows.Count, 14).End(xlUp).Row + 1
--------------------


Or create a function


Code:
--------------------
Option Explicit

Function lastRow(Col As Long) As Long
lastRow = Cells(Rows.Count, Col).End(xlUp).Row + 1
End Function

Sub test()
MsgBox lastRow(14)
End Sub
--------------------


--
royUK

Hope that helps, RoyUK
For tips & examples visit my 'web site
' (http://www.excel-it.com)
------------------------------------------------------------------------
royUK's Profile: http://www.thecodecage.com/forumz/member.php?userid=15
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=33672

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
Average Formula to display blank cell if named range is blank Rachael F Excel Worksheet Functions 3 February 22nd 08 05:05 PM
Start Cell B1 then find first blank cell, insert subtotal, next non blank, then next blank, sutotal cells in between......... [email protected][_2_] Excel Programming 2 June 7th 07 09:27 PM
Need macro to check if cell is not blank & previous cell is blank, copy information from row above & paste JenIT Excel Programming 4 April 12th 07 08:56 PM
Copy to first Blank cell in Colum C Non blank cells still exist be Ulrik loves horses Excel Programming 2 October 8th 06 07:35 PM
COPY A CONCATENATE CELL TO BLANK CELL PUTTING IN THE NEXT BLANK C. QUEST41067 Excel Discussion (Misc queries) 1 January 15th 05 09:29 PM


All times are GMT +1. The time now is 07:52 AM.

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"