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.
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.
http://www.contextures.com/xlfaqMac.html#Empty
HTH. Best wishes Harald
"Maxi" <[email protected]> skrev i melding
news:[email protected]...
>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.
>
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" <[email protected]> wrote in message
news:[email protected]...
> 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.
>
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")
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" <[email protected]> wrote
in message news:[email protected]...
>
> 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
>
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" <[email protected]> wrote
> in message news:[email protected]...
> >
> > 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
> >
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks