Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
GS GS is offline
external usenet poster
 
Posts: 364
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hpw do I delete multiple empty rows found between filled rows? Bill Excel Worksheet Functions 2 November 15th 09 07:12 PM
3rd and last Revised WorkBook Aussiegirlone Excel Discussion (Misc queries) 3 June 21st 09 07:02 PM
Revised Dropdown list not applying to some rows Ashutosh Excel Discussion (Misc queries) 5 May 23rd 07 02:26 PM
Exporting Only Filled Rows To Another Workbook Cuneyt Excel Programming 12 March 21st 06 07:48 PM
Format excel to revised date automatically when revised annetteberrios Excel Programming 0 September 2nd 05 02:25 PM


All times are GMT +1. The time now is 12:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"