Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Next Empty Row
Hello VB fiens... How can I bypass an empty cell in a row when trying to add a row? Scenario: I created a userform to input data into excel worksheet. Data will be added...nextrow..nextrow.. One row may contain 2 empty fields resulting empty field to be next row to append. this is sample code for procedu Nextrow = _ Application.WorksheetFunction.CountA(Range("A:A")) + 2 Cells(Nextrow, 1) = txtfast.Text thanks in advance for your help & enjoy life!! myrna *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Next Empty Row
Hi Myrna,
Here's an example of what I use.... Private Sub CommandButton1_Click() ' assuming it's the OK button on the userform With ActiveSheet() 'This macro gets the first empty cell in the active sheet. [A65536].Select Selection.End(xlUp)(2).Select ActiveCell.Value = Date ActiveCell.Offset(0, 1).Value = ComboBox2.Value ActiveCell.Offset(0, 2).Value = ComboBox3.Value etc.... Just make sure there'a always something to be entered in the Column A. Personnally, I always enter todays's date. But you may want to enter an X in the cell, and hide the column... I hope this helps... Bonne journée Denys -----Original Message----- Hello VB fiens... How can I bypass an empty cell in a row when trying to add a row? Scenario: I created a userform to input data into excel worksheet. Data will be added...nextrow..nextrow.. One row may contain 2 empty fields resulting empty field to be next row to append. this is sample code for procedu Nextrow = _ Application.WorksheetFunction.CountA(Range("A:A")) + 2 Cells(Nextrow, 1) = txtfast.Text thanks in advance for your help & enjoy life!! myrna *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Next Empty Row
thanks Danys for your help!
Still having a problem validating empty cell to add next row. When I run OK button, I need to be able to add row even if empty cells exist in previous row. For Example: col A B C row 1 red blue green 2 red blue 3 If C2 is empty, I need to skip over empty cell and go to next row 3. any suggestions?? thanks *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Next Empty Row
I have almost the same problem.
I attached a picture because I'm not very good at explaining. The problem is that how can i find first empty row in worksheet an after it has been found insert left and right borders. That 18th ro has been added automatically by sum'ing column G. Eventually it should be something like this: X A B C G 17 |content| content | and so on | 18 |first empty row | empty | sum of column G | The main thing is that to get borders on first empty row. I'm pretty sure that U woun't understand but I hope that u can : :rolleyes Attachment filename: excel.jpg Download attachment: http://www.excelforum.com/attachment.php?postid=57103 -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
To find row is empty or not | Excel Discussion (Misc queries) | |||
Find first empty row | Excel Discussion (Misc queries) | |||
find the next empty row | Excel Discussion (Misc queries) | |||
find last none empty cell | Excel Discussion (Misc queries) | |||
Find Empty Cell | Excel Programming |