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

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

mahen77

Board Regular
Joined
May 16, 2004
Messages
77
Hi,

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

Thanks
Mahen
 
Upvote 0

ZapatoGrande

New Member
Joined
Dec 16, 2004
Messages
10
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

jindon

MrExcel MVP
Joined
Aug 21, 2004
Messages
16,995
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,195,632
Messages
6,010,807
Members
441,569
Latest member
PeggyLee

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
Top