Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Please help find the next empty cell
Here is the scenerio any help would be great!!!!
1. So I have two pages in the worksheet one named "form" and the othe named "data". 2. The form page has a submitt button at the bottom that runs a macr that basically cuts and pastes all required data to "data page". Easy enough...My Problem... How do I find the next open row (on the "data" page) so when the secon line of data is entered it does not overwrite the first? Is thi something that can "easily" be done in excel? Any thoughts of Excel wisdom would be great -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Please help find the next empty cell
This will tell you the first available row at the end of a
range. NextRow = ActiveSheet.Range("A65536").End(xlup).Row Or you could return the address. NextRow = ActiveSheet.Range("A65536").End(xlup).Row tod -----Original Message----- Here is the scenerio any help would be great!!!! 1. So I have two pages in the worksheet one named "form" and the other named "data". 2. The form page has a submitt button at the bottom that runs a macro that basically cuts and pastes all required data to "data page". Easy enough...My Problem... How do I find the next open row (on the "data" page) so when the second line of data is entered it does not overwrite the first? Is this something that can "easily" be done in excel? Any thoughts of Excel wisdom would be great! --- Message posted from http://www.ExcelForum.com/ . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Please help find the next empty cell
Private Function LastRow() As Integer
Dim i as Integer Dim stp as Boolean i = 1 stp = IsEmpty(Worksheets("data").Cells(i, 1)) While stp = False i = i + 1 stp = IsEmpty(Worksheets("data").Cells(i, 1)) Wend LastRow = i End Function Hope this helps. -TJ On Mon, 17 May 2004 15:25:54 -0500, wrote: Here is the scenerio any help would be great!!!! 1. So I have two pages in the worksheet one named "form" and the other named "data". 2. The form page has a submitt button at the bottom that runs a macro that basically cuts and pastes all required data to "data page". Easy enough...My Problem... How do I find the next open row (on the "data" page) so when the second line of data is entered it does not overwrite the first? Is this something that can "easily" be done in excel? Any thoughts of Excel wisdom would be great! --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Please help find the next empty cell
cNextRow = Worksheets("Data").Cells(Rows.Count,"A").End(xlUp) .Row+1 -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "pcarsquared " wrote in message ... Here is the scenerio any help would be great!!!! 1. So I have two pages in the worksheet one named "form" and the other named "data". 2. The form page has a submitt button at the bottom that runs a macro that basically cuts and pastes all required data to "data page". Easy enough...My Problem... How do I find the next open row (on the "data" page) so when the second line of data is entered it does not overwrite the first? Is this something that can "easily" be done in excel? Any thoughts of Excel wisdom would be great! --- Message posted from http://www.ExcelForum.com/ |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Please help find the next empty cell
On Mon, 17 May 2004 15:25:54 -0500, wrote:
OR lastRow = Worksheets("data").UsedRange.Rows.Count + 1 So many objects, so many members, so little time. :) -TJ Here is the scenerio any help would be great!!!! 1. So I have two pages in the worksheet one named "form" and the other named "data". 2. The form page has a submitt button at the bottom that runs a macro that basically cuts and pastes all required data to "data page". Easy enough...My Problem... How do I find the next open row (on the "data" page) so when the second line of data is entered it does not overwrite the first? Is this something that can "easily" be done in excel? Any thoughts of Excel wisdom would be great! --- Message posted from http://www.ExcelForum.com/ |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Please help find the next empty cell
One way
'***** Option Explicit Sub saveForm() Dim destCell As Range Set destCell = Worksheets("Data").Cells(Rows.Count, "A") _ .End(xlUp).Offset(1, 0) With destCell 'assuming Form is the active sheet .Offset(0, 0).Value = Range("B1").Value .Offset(0, 1).Value = Range("B2").Value .Offset(0, 2).Value = Range("B3").Value .Offset(0, 3).Value = Range("B4").Value End With End Sub '***** HTH Anders Silven "pcarsquared " skrev i meddelandet ... Here is the scenerio any help would be great!!!! 1. So I have two pages in the worksheet one named "form" and the other named "data". 2. The form page has a submitt button at the bottom that runs a macro that basically cuts and pastes all required data to "data page". Easy enough...My Problem... How do I find the next open row (on the "data" page) so when the second line of data is entered it does not overwrite the first? Is this something that can "easily" be done in excel? Any thoughts of Excel wisdom would be great! --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do i find last not empty cell in a range | Excel Worksheet Functions | |||
Find empty cell then stop | Excel Discussion (Misc queries) | |||
find last none empty cell | Excel Discussion (Misc queries) | |||
Find 1st Empty Cell: How to? | Excel Programming | |||
Find Empty Cell | Excel Programming |