[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

Re: Locating 1st blank cell in named range

Trevor Shuttleworth

12/13/2006 10:32:00 PM

Try: Range("BankAccounts").End(xldown).Offset(1, 0).Select

Range("BankAccounts").End(xlup).Offset(1, 0).Select gives me cell A2

Regards

Trevor


"BOBODD" <BOBODD@discussions.microsoft.com> wrote in message
news:B54BEB6E-481F-4670-BAD5-F57F3D8771CB@microsoft.com...
>I have a named range "BankAccounts" which is A12:A52. This range fills from
> A12 down. I'm using
>
> Range("BankAccounts").End(xlUp).Offset(1, 0).Select
>
> To try to find the first blank cell, but this is returning A1. What have
> I
> missed?


1 Answer

Bob Phillips

12/13/2006 11:03:00 PM

0

Assuming that A12:A52 has data

Range("BankAccounts").end(xldown).Offset(1, 0).Select


If not

cells(Range("BankAccounts").rows.count+Range("BankAccounts").row-1,Range("BankAccounts").Column).offset(1,0).select


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Trevor Shuttleworth" <Trevor@Shucks.demon.co.uk> wrote in message
news:eBKmIawHHHA.3872@TK2MSFTNGP06.phx.gbl...
> Try: Range("BankAccounts").End(xldown).Offset(1, 0).Select
>
> Range("BankAccounts").End(xlup).Offset(1, 0).Select gives me cell A2
>
> Regards
>
> Trevor
>
>
> "BOBODD" <BOBODD@discussions.microsoft.com> wrote in message
> news:B54BEB6E-481F-4670-BAD5-F57F3D8771CB@microsoft.com...
>>I have a named range "BankAccounts" which is A12:A52. This range fills
>>from
>> A12 down. I'm using
>>
>> Range("BankAccounts").End(xlUp).Offset(1, 0).Select
>>
>> To try to find the first blank cell, but this is returning A1. What have
>> I
>> missed?
>
>