Help automating a row copy feature

ZapatoGrande

New Member
Joined
Dec 16, 2004
Messages
10
Hi guys,
I need to copy an entire row from a worksheet ("Today") to another worksheet ("Summary") based upon the value of column K in the worksheet "Today" not being empty. I would like a macro to do it so I can assign it to a button.
Thanks in advance,
ZG
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi,

can you be more specific and send the data file so that I can do somthing on this.

Thanks
Mahen
 
Upvote 0
I don't own the file, so I cannot send it out, sorry. What more specifics do you need? Column K of each row is either a number (a percent improvement) or blank.
ZG
 
Upvote 0
Hi

assuming row 1 has headings

Code:
Sub transfer()
Dim r As Range, LastR As Long
Application.ScreenUpdating = False
With Sheets("Today")
    If Application.CountA(.Range("k:k")) < 1 Then GoTo Last
        Sheets("Summary").Cells.Clear
    For Each r In Range("k1", Range("k65536").End(xlUp))
        If Not IsEmpty(r) Then
            LastR = Sheets("Summary").Range("k65536").End(xlUp).Row
            r.EntireRow.Copy Destination:=Sheets("Summary").Rows(LastR + 1)
        End If
    Next
End With
Last: Application.ScreenUpdating = True
End Sub
hope this helps
jindon
 
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,576
Members
448,972
Latest member
Shantanu2024

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top