Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default How can I select the first blank cell

Hi all,
please help. I have to add every day new data (number of rows is various) to
existing data sheet. I suppose to use macro and run that automatically at
night. As I have to add it to table where number of rows will groe up, I need
to start copying new data to the first blank cell in the first column. How
can I force macro to find this blank cell when the position will shift?
Many thanks,
Valdemar
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default How can I select the first blank cell

Find the end of a list:
here are a couple different ways:

this will select the cell. it's not a good practice to select, but just used
as
an illustration here.

range(worksheets("Sheet1").cells(rows.Count,"A").e nd(xlup).address).Select

or if you just want A5 returned:

lastcell = worksheets("Sheet1").cells(rows.Count,"A").end(xlu p).address(0,0)

Find Last Used Cell:
Sub FindLastCell1()
Cells(Rows.Count, "A").End(xlUp).Select
End Sub

Sub FindLastCell2()
Range("A:A").Find("*", Cells(1), _
xlValues, xlWhole, xlByRows, xlPrevious).Select
End Sub


--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Valdemar" wrote:

Hi all,
please help. I have to add every day new data (number of rows is various) to
existing data sheet. I suppose to use macro and run that automatically at
night. As I have to add it to table where number of rows will groe up, I need
to start copying new data to the first blank cell in the first column. How
can I force macro to find this blank cell when the position will shift?
Many thanks,
Valdemar

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default How can I select the first blank cell

Valdemar,

ActiveSheet.Cells(Rows.Count,1).End(xlUp)(2).Selec t

will select the first empty cell at the bottom of column A.

HTH,
Bernie
MS Excel MVP


"Valdemar" wrote in message
...
Hi all,
please help. I have to add every day new data (number of rows is various) to
existing data sheet. I suppose to use macro and run that automatically at
night. As I have to add it to table where number of rows will groe up, I need
to start copying new data to the first blank cell in the first column. How
can I force macro to find this blank cell when the position will shift?
Many thanks,
Valdemar



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default How can I select the first blank cell

Hi ryguy7272, many thanks for you help and have a nice day
Valdemar

ryguy7272 pÃ*Å¡e:

Find the end of a list:
here are a couple different ways:

this will select the cell. it's not a good practice to select, but just used
as
an illustration here.

range(worksheets("Sheet1").cells(rows.Count,"A").e nd(xlup).address).Select

or if you just want A5 returned:

lastcell = worksheets("Sheet1").cells(rows.Count,"A").end(xlu p).address(0,0)

Find Last Used Cell:
Sub FindLastCell1()
Cells(Rows.Count, "A").End(xlUp).Select
End Sub

Sub FindLastCell2()
Range("A:A").Find("*", Cells(1), _
xlValues, xlWhole, xlByRows, xlPrevious).Select
End Sub


--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Valdemar" wrote:

Hi all,
please help. I have to add every day new data (number of rows is various) to
existing data sheet. I suppose to use macro and run that automatically at
night. As I have to add it to table where number of rows will groe up, I need
to start copying new data to the first blank cell in the first column. How
can I force macro to find this blank cell when the position will shift?
Many thanks,
Valdemar

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default How can I select the first blank cell

Hi Bernie, many thanks for your very usefull help
Valdemar

Bernie Deitrick pÃ*Å¡e:

Valdemar,

ActiveSheet.Cells(Rows.Count,1).End(xlUp)(2).Selec t

will select the first empty cell at the bottom of column A.

HTH,
Bernie
MS Excel MVP


"Valdemar" wrote in message
...
Hi all,
please help. I have to add every day new data (number of rows is various) to
existing data sheet. I suppose to use macro and run that automatically at
night. As I have to add it to table where number of rows will groe up, I need
to start copying new data to the first blank cell in the first column. How
can I force macro to find this blank cell when the position will shift?
Many thanks,
Valdemar



.

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
Select until blank row Bonnie Excel Discussion (Misc queries) 8 July 21st 08 08:41 PM
Is there a formula to select the last non-blank cell in a list BROCK8292 Excel Discussion (Misc queries) 10 March 25th 08 12:32 AM
Select NON blank cells pcor New Users to Excel 8 September 18th 06 10:55 AM
How do I select & use contents of first non-blank cell in row? plf100 Excel Worksheet Functions 9 November 15th 05 12:16 PM
I want to select the first blank cell in column A Greegan Excel Worksheet Functions 7 March 13th 05 12:56 PM


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