Hi Yu, Thanks. I guess we could use the Range thingy to do the same thing. This allows us to input the Column using its alphabetic notation. The following 2 lines do the same thing, finding the next cell in Column AA
B = Cells(Rows.Count, 27).End(xlUp).Offset(1, 0).Address B = Range("AA" & Rows.Count).End(xlUp).Offset(1, 0).Address Regards - Dave. Date: Sat, 6 Jun 2009 10:25:44 +0200 Subject: $$Excel-Macros$$ Re: Tips From: vincent2...@gmail.com To: excel-macros@googlegroups.com Hi Dave, Thanks for your share. This is one of lines I used a lot as well. The only drawback of this is that you need to give it the number of Column. Most of times, it is more easier to give the Column Name,like "A" instead of 1 when it reaches beyond "AA" 'cos you need to count the number manually. My solution is I write a few lines to convert string name of Column to number. How do you guys do it? or you use another way to find blank cells? Cheers Yu On Sat, Jun 6, 2009 at 10:12 AM, Dave Bonallack <davebonall...@hotmail.com> wrote: Hi Group, Tip. The following line of code line returns the first blank cell at the end of a series of data, ignoring any blank cells within that series. In this case, the series is in Col A. I use it a lot when copying stuff onto the bottom of existing data. This is not new, but might be useful for those still learning VBA - which I guess is all of us really... A = Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Address If you just need to know the Row number, use A = Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row By the way, I think this 'submit your tip' idea is excellent. Regards - Dave. Click Here View photos of singles in your area _________________________________________________________________ Looking for a new car this winter? Let us help with car news, reviews and more http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldwide%2Ecom%2Fcgi%2Dbin%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801459%2Fpi%5F1004813%2Fai%5F859641&_t=762955845&_r=tig_OCT07&_m=EXT --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---