Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default copy rows in range if data in first cell

I triued the suggestion by Chip Pearson using the following code which seems
to be working:
Dim Destination As Range
Dim RowNumber As Long
Set Destination = Worksheets(2).Range("A1")
For RowNumber = 8 To 508
If Len(Cells(RowNumber, "A").Text) 0 Then
Rows(RowNumber).Copy Destination:=Destination
Set Destination = Destination(2, 1)
End If
Next RowNumber

However, I need more help on this.
Firstly, I am wanting to copy into a specific sheet in a different Workbook,
not another sheet in the same one. (The destination Workbook will be one of
several others open at the same time.)
Secondly I want to paste "Values Onlly"
Thirdly, I want the data to the next row having no data in the first column
in the destination Workbook. i.e. to be added in rows below data previously
posted there by this macro.

I tried making changes to the code to achieve this but I guess it's beyond
my knowledge since it does not work.

Please assist.

"Wes_A" wrote:

Wow! Thank you folks for the different suggestions, I will try and see which
works best, but will keep all on record for future ref.
I find this forum so very helpful since I am no expert in programming, but
self taught. Thank you all so much for the recommendations.
Wes

"Wes_A" wrote:

I need to select from a range of rows - only those having data (formula
result) in the first cell. There will be some rows without data in the first
cell but they would contain a formula - these shoudl not be selected for copy.
I want to select and copy all the rows having data in the first cell in
order to paste these rows as values into a separate sheet in another workbook.
Any suggestion?

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
Copy a range of cells 15 rows down and repeat to empty cell Mike V Excel Programming 2 June 6th 08 01:48 PM
Copy rows of data (eliminating blank rows) from fixed layout Sweepea Excel Discussion (Misc queries) 1 March 13th 07 11:05 PM
Read through Range and copy Cell data to Array missleigh[_2_] Excel Programming 1 April 13th 06 12:47 PM
Read through Range and copy Cell data to Array missleigh[_2_] Excel Programming 1 April 13th 06 12:00 AM
How to copy data in one cell into different rows catchxan Excel Worksheet Functions 1 November 28th 05 01:25 AM


All times are GMT +1. The time now is 11:59 PM.

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

About Us

"It's about Microsoft Excel"