Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Identifying last row number

I have data in range A1 to A10. I want to find the first blank cell in
column A which is at A11. Therefore the VBA should give result as 11.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default Identifying last row number

http://www.contextures.com/xlfaqMac.html#Empty

HTH. Best wishes Harald

"Maxi" skrev i melding
ups.com...
I have data in range A1 to A10. I want to find the first blank cell in
column A which is at A11. Therefore the VBA should give result as 11.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Identifying last row number

All you need is

FirstEmptyRow = Range("A1").End(xlDown).Row + 1

If you want the first blank cell after the last data cell where there may be
embedded blanks, e.g. A3 and a4 may be blank, but A5 is not, then us

EmptyRow = Cells(Rows.Count,"A").End(xlUp).Row + 1

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Maxi" wrote in message
ups.com...
I have data in range A1 to A10. I want to find the first blank cell in
column A which is at A11. Therefore the VBA should give result as 11.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Identifying last row number


Kind of similar to this, I was wondering how to find the last 5
non-blank items in a range (which just say I've called "TheRange")


--
godonnygo
------------------------------------------------------------------------
godonnygo's Profile: http://www.excelforum.com/member.php...o&userid=37124
View this thread: http://www.excelforum.com/showthread...hreadid=568925

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Identifying last row number

Are they contiguous? If so just use

LastRow = Cells(Rows.Count,"A").End(xlUp).Row
Set MyRange = Cells(LastRow,"A").Offset(-4,0).Resize(5)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"godonnygo" wrote
in message ...

Kind of similar to this, I was wondering how to find the last 5
non-blank items in a range (which just say I've called "TheRange")


--
godonnygo
------------------------------------------------------------------------
godonnygo's Profile:

http://www.excelforum.com/member.php...o&userid=37124
View this thread: http://www.excelforum.com/showthread...hreadid=568925





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Identifying last row number

Thanks Bob. Issue resolved


Bob Phillips wrote:
Are they contiguous? If so just use

LastRow = Cells(Rows.Count,"A").End(xlUp).Row
Set MyRange = Cells(LastRow,"A").Offset(-4,0).Resize(5)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"godonnygo" wrote
in message ...

Kind of similar to this, I was wondering how to find the last 5
non-blank items in a range (which just say I've called "TheRange")


--
godonnygo
------------------------------------------------------------------------
godonnygo's Profile:

http://www.excelforum.com/member.php...o&userid=37124
View this thread: http://www.excelforum.com/showthread...hreadid=568925


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
Identifying next number in a range and referencing it Verlaesslichkeit Excel Discussion (Misc queries) 16 September 2nd 08 10:59 PM
Searching for mulitple strings and assigning identifying number Nicole Seibert Excel Worksheet Functions 3 February 27th 06 07:37 PM
Identifying the last number in a row. Richard Buttrey Excel Programming 3 March 30th 05 06:24 PM
Identifying Top row teresa Excel Programming 4 January 13th 05 06:27 AM
Identifying a value jtrevill[_4_] Excel Programming 1 November 18th 04 05:56 PM


All times are GMT +1. The time now is 08:41 PM.

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"