Need assistance with Excel 2007

  • Thread starter Thread starter tai_chi_bear
  • Start date Start date
T

tai_chi_bear

Hello everyone.

Ok, here is my issue. I have seven sheets each with a table that is
from B14 to U513. In column Q (from row 14 to 513), of each sheet,
there is nothing (" ") or a number from 0 and up.

Here is what I need. On sheet 1, for each cell in column Q, if the
value is null (nothing), move to the next cell. If value is greater
then 0, I want to copy the corresponding row onto sheet8. Once sheet 1
is done, i want to do the same operation on the next sheet, then the
next, until all 7 sheets are done.

Please note that although I am pretty good with formulas, I know
nothing about programming macros or VB. But i have a feeling this
would be a piece of cake for some pros on here.

Let me know if you need more information. Thank you in advance.
 
Sub MoveRows()

NewRow = 1
For ShtCount = 1 To 7
With Sheets(ShtCount)
For RowCount = 14 To 513
If .Range("Q" & RowCount).Value > 0 Then
.Rows(RowCount).Copy _
Destination:=Sheets(8).Rows(NewRow)
NewRow = NewRow + 1
End If
Next RowCount
End With

Next ShtCount

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top