Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default detecting the first blank row in the spreadsheet and populate the blank row with data


hi to all,

i'm writting a marco to populate the row and col in the spreadsheet. I
provide an form interface for the user to key in the data before
reflect the data in the spreadsheet. my question is how do i detect the
first blank row and transfer the data into that blank row in the
spreadsheet.

i only have 9 columns and therefore i hardcode the colum, however, i
need to find the blank rows so as to insert the data.

Cells(currentRow, 1) = txtTime.Text
Cells(currentRow, 2) = txtDate.Text

can someone tell me how to fiind the index of the rows???????

Thank in advance


--
racerrunner
------------------------------------------------------------------------
racerrunner's Profile: http://www.excelforum.com/member.php...o&userid=34415
View this thread: http://www.excelforum.com/showthread...hreadid=541895

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default detecting the first blank row in the spreadsheet and populate the blank row with data

Hi RaceRunner,

Assuming that column A can be used to determine the blank row, try:

Dim FirstBlankRow As Long

FirstBlankRow = Cells(Rows.Count, "A").End(xlUp)(2).Row



---
Regards,
Norman



"racerrunner"
wrote in message
...

hi to all,

i'm writting a marco to populate the row and col in the spreadsheet. I
provide an form interface for the user to key in the data before
reflect the data in the spreadsheet. my question is how do i detect the
first blank row and transfer the data into that blank row in the
spreadsheet.

i only have 9 columns and therefore i hardcode the colum, however, i
need to find the blank rows so as to insert the data.

Cells(currentRow, 1) = txtTime.Text
Cells(currentRow, 2) = txtDate.Text

can someone tell me how to fiind the index of the rows???????

Thank in advance


--
racerrunner
------------------------------------------------------------------------
racerrunner's Profile:
http://www.excelforum.com/member.php...o&userid=34415
View this thread: http://www.excelforum.com/showthread...hreadid=541895



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default detecting the first blank row in the spreadsheet and populate the blank row with data


Hi Norman,

Thank you for your help. It works prefectly. Thank you very much

--
racerrunne
-----------------------------------------------------------------------
racerrunner's Profile: http://www.excelforum.com/member.php...fo&userid=3441
View this thread: http://www.excelforum.com/showthread.php?threadid=54189

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
How do I delete blank rows (rows alternate data, blank, data, etc ncochrax Excel Discussion (Misc queries) 2 June 27th 07 04:40 AM
Ignore blank rows to populate custom drop down list column range vidtec Excel Programming 3 April 24th 06 07:27 PM
Imported Data creates blank cells that aren't really blank JackieD Excel Worksheet Functions 14 February 23rd 06 12:57 AM
formula to populate while skipping blank fields Chris Hudd Excel Worksheet Functions 1 July 12th 05 10:41 AM
Eliminating rows of data in excel spreadsheet that have blank cell in row A and data in row B - E Steven R. Berke Excel Programming 1 July 8th 03 11:22 PM


All times are GMT +1. The time now is 04:15 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"