Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Exporting Only Filled Rows To Another Workbook (revised)
Hi Guys,
Can one of you pls help me to update below code to export the data to below path. Path= C:\FebTest.xls Sheet=Data Sub CopyFilledRows() ' Copies the contents of each non-empty row in a range, ' to another location with no empty rows. Dim RangeToExport As Range, r As Object Dim lRow As Long, lTargetRow As Long Set RangeToExport = ActiveSheet.Range("$A$1:$C$6") lRow = RangeToExport.Rows(1).Row lTargetRow = 1 With RangeToExport For Each r In .Rows If Application.WorksheetFunction.CountA(.Rows(lRow)) 0 Then .Rows(lRow).Copy Destination:=ActiveSheet.Range("$E$" & lTargetRow) lTargetRow = lTargetRow + 1 End If lRow = lRow + 1 Next End With End Sub Thanks for all support! Kindest Regards, Cuneyt KUYUMCU |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Exporting Only Filled Rows To Another Workbook (revised)
Hi Cuneyt,
I posted a revised solution in your previous thread earlier today. (currently 2 pages further back) Regards, GS |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hpw do I delete multiple empty rows found between filled rows? | Excel Worksheet Functions | |||
3rd and last Revised WorkBook | Excel Discussion (Misc queries) | |||
Revised Dropdown list not applying to some rows | Excel Discussion (Misc queries) | |||
Exporting Only Filled Rows To Another Workbook | Excel Programming | |||
Format excel to revised date automatically when revised | Excel Programming |