This one does exclude any data on the last row that is to the right of a
blank cell. However, if there is data further down in column A after some
blank cells then this will find it and copy that row. More code would be
needed to avoid data that is below the contiguous data in column A.
Sub test()
Dim LRow As Long
Dim MyRng As Range
LRow = Cells(Rows.Count, 1).End(xlUp).Row
Set MyRng = Range("A" & LRow)
Range(MyRng, MyRng.End(xlToRight)).Copy Range("A" & LRow + 1)
End Sub
Mike F
"Sam via OfficeKB.com" <u4102@uwe> wrote in message
news:77e9d5b8918b2@uwe...
> Hi Mike,
>
> Thanks for reply and assistance.
>
> Does your solution take into account Gary's Student Post:
>
>>If A13 and B13 have values, C13 is empty, and D13 has a value,
>>then
>>do you want A13 thru B13 or A13 thru D13?
>
> I would like A13 thru B13
>
>>Mike Fogleman wrote:
>>Is there other data surrounding this contiguous data that we need to
>>avoid?
>>If not, then this simple code will do it:
>
> Sub test()
> Dim LRow As Long
>
> LRow = Cells(Rows.Count, 1).End(xlUp).Row
> Rows(LRow).Copy Rows(LRow + 1)
> End Sub
>
>>Mike F
>
> Mike, will this code work with my request for A13 thru B13 based on
> above,
> selecting only contiguous data filled cells on that row?
>
> Please advise.
>
> Cheers,
> Sam
>
> --
> Message posted via http://www.officekb.com
>