Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy range
I have copied data from several excel sheets to a summary sheet, but
it contains data that I don't want included. On the summary sheet, I would like to copy only the rows of data that do not include a zero in column K of that row over to another area of that sheet. This area would then display only the data I want to see without any spaces between rows where the missing data would have been. Is there an easy way to do this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy range
Sub copy_non_zero()
LastRow = Range("K" & Rows.Count).End(xlUp).Row NewRowCount = 1 For RowCount = 1 To LastRow If Range("K" & RowCount) < 0 Then Set SourceRange = Range("A" & RowCount & ":K" & _ RowCount) SourceRange.Copy Destination:= _ Range("AA" & NewRowCount) NewRowCount = NewRowCount + 1 End If Next RowCount End Sub " wrote: I have copied data from several excel sheets to a summary sheet, but it contains data that I don't want included. On the summary sheet, I would like to copy only the rows of data that do not include a zero in column K of that row over to another area of that sheet. This area would then display only the data I want to see without any spaces between rows where the missing data would have been. Is there an easy way to do this? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy range
On Dec 22 2007, 7:07*pm, Joel wrote:
Sub copy_non_zero() LastRow = Range("K" & Rows.Count).End(xlUp).Row NewRowCount = 1 For RowCount = 1 To LastRow * *If Range("K" & RowCount) < 0 Then * * * Set SourceRange = Range("A" & RowCount & ":K" & _ * * * * *RowCount) * * * SourceRange.Copy Destination:= _ * * * * *Range("AA" & NewRowCount) * * * NewRowCount = NewRowCount + 1 * *End If Next RowCount End Sub " wrote: I have copied data from several excel sheets to a summary sheet, but it contains data that I don't want included. *On the summary sheet, I would like to copy only the rows of data that do not include a zero in column K of that row over to another area of that sheet. *This area would then display only the data I want to see without any spaces between rows where the missing data would have been. Is there an easy way to do this?- Hide quoted text - - Show quoted text - Joel, I just recently had a chance to review your response. Thanks for your help. Frank |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
RANGE EXCEL copy cell that meets criteria in a range | Excel Worksheet Functions | |||
copy formulas from a contiguous range to a safe place and copy them back later | Excel Programming | |||
Create/copy combo boxes in one range if condition is met in a different range | Excel Programming | |||
Code to copy range vs Copy Entire Worksheet - can't figure it out | Excel Programming | |||
Range COPY function - how to copy VALUES and not formulas | Excel Programming |