Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
To find row is empty or not pol Excel Discussion (Misc queries) 2 July 27th 09 01:22 PM
Find first empty row [email protected] Excel Discussion (Misc queries) 3 July 29th 06 07:52 PM
find the next empty row ASU Excel Discussion (Misc queries) 2 June 12th 06 10:05 AM
find last none empty cell kevcar40 Excel Discussion (Misc queries) 3 March 1st 06 11:59 AM
Find Empty Cell Wally Steadman[_3_] Excel Programming 3 November 23rd 03 10:50 PM


All times are GMT +1. The time now is 02:36 AM.

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"