Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Finding the first empty cell in a column

Hi Tegger,

I found a problem though in that the exported XML workbook for
some reason have a few rows within the customer transactions that
are blank so End(xlDown) does not go to the last record. I am going
to have to find some other method to find the final entry in the table.


Try:;

Set rng = Cells(Rows.Count, "A").End(xlUp)(2)


---
Regards,
Norman



"Tegger" wrote in message
...
The expression:

Set rng = Range("A1").End(xlDown)(2)


is an abbreviated version of:

Set rng = Range("A1").End(xlDown).Item(2, 1).

Chip Pearson hosts an excellent discussion, written by Alan Beban, of
this
method at:

http://www.cpearson.com/excel/cells.htm

The above expressions are equivalent to:

Set rng = Range("A1").End(xlDown).Offset(1, 0)


Ahhh... Now i understand, you and Alan explained it perfectly. I found a
problem though in that the exported XML workbook for some reason have a
few
rows within the customer transactions that are blank so End(xlDown) does
not
go to the last record. I am going to have to find some other method to
find
the final entry in the table. Thx for your help, knowing how Item works
seems like it will be very usefull.



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
Finding First Empty Cell in a Column TomHull Excel Discussion (Misc queries) 5 November 9th 09 01:19 AM
Finding First Empty Cell in a Column TomHull Excel Discussion (Misc queries) 0 November 9th 09 12:21 AM
Finding Column based on input, then first empty row Charles Excel Programming 2 April 1st 04 07:56 PM
Finding Column based on input, then first empty row stevem[_2_] Excel Programming 0 April 1st 04 07:01 PM
Finding last non-empty column in row... Mika[_3_] Excel Programming 2 November 11th 03 08:50 PM


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