Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Find 1st Empty Cell: How to?

Hello, this has got me stumped. Being fairly new I hope you'll bear with me.
I have selected cellA1:A500 and sorted it so that only filled cells appear
from A1 onwards. However I'm never sure where the filled range will end and
want to store the 1st empty cellname in a variable too shorten my read loop.
But how do I determine the 1st empty cell?

thanks for any help.
Chris


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Find 1st Empty Cell: How to?

You can use this Chris

Range("A" & Rows.Count).End(xlUp).row
This wis the last cell with a value inn column A

For Myrow = 1 To Range("A" & Rows.Count).End(xlUp).row


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Chris" wrote in message ...
Hello, this has got me stumped. Being fairly new I hope you'll bear with me.
I have selected cellA1:A500 and sorted it so that only filled cells appear
from A1 onwards. However I'm never sure where the filled range will end and
want to store the 1st empty cellname in a variable too shorten my read loop.
But how do I determine the 1st empty cell?

thanks for any help.
Chris




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Find 1st Empty Cell: How to?

set rng = Range("A1:A500").Specialcells(xlblanks)(1)


or

set rng = cells(rows.count,1).End(xlup)(2)

--
Regards,
Tom Ogilvy


"Chris" wrote in message
...
Hello, this has got me stumped. Being fairly new I hope you'll bear with

me.
I have selected cellA1:A500 and sorted it so that only filled cells appear
from A1 onwards. However I'm never sure where the filled range will end

and
want to store the 1st empty cellname in a variable too shorten my read

loop.
But how do I determine the 1st empty cell?

thanks for any help.
Chris




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Find 1st Empty Cell: How to?

Thanks!
"Ron de Bruin" wrote in message
...
You can use this Chris

Range("A" & Rows.Count).End(xlUp).row
This wis the last cell with a value inn column A

For Myrow = 1 To Range("A" & Rows.Count).End(xlUp).row


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Chris" wrote in message

...
Hello, this has got me stumped. Being fairly new I hope you'll bear with

me.
I have selected cellA1:A500 and sorted it so that only filled cells

appear
from A1 onwards. However I'm never sure where the filled range will end

and
want to store the 1st empty cellname in a variable too shorten my read

loop.
But how do I determine the 1st empty cell?

thanks for any help.
Chris






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Find 1st Empty Cell: How to?

U2 Thanks!!
"Tom Ogilvy" wrote in message
...
set rng = Range("A1:A500").Specialcells(xlblanks)(1)


or

set rng = cells(rows.count,1).End(xlup)(2)

--
Regards,
Tom Ogilvy


"Chris" wrote in message
...
Hello, this has got me stumped. Being fairly new I hope you'll bear with

me.
I have selected cellA1:A500 and sorted it so that only filled cells

appear
from A1 onwards. However I'm never sure where the filled range will end

and
want to store the 1st empty cellname in a variable too shorten my read

loop.
But how do I determine the 1st empty cell?

thanks for any help.
Chris






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
Find first empty cell in column TomHull Excel Discussion (Misc queries) 1 November 9th 09 05:16 AM
Find first empty cell in column TomHull Excel Discussion (Misc queries) 2 November 9th 09 01:37 AM
How to: Find first empty cell in column DW Excel Worksheet Functions 18 October 12th 07 05:57 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:29 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"