copy cells with criteria
copy cells with criteria
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: copy cells with criteria

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default copy cells with criteria

     
    On the very last page of a workbook, called Conclusion, I would like, every time it is opened, by the user, it to go through all of my other worksheets and grab data from them to copy into this last one. Speed is not important. Can someone give me a starting point, advice, on this?

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    London, UK
    Posts
    167
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    put this code into the module relating to the worksheet that you require all the totals to be zapped onto...

    Private Sub Worksheet_Activate()

    ActiveSheet.Cells.ClearContents

    outputrow = 1
    For sn = 1 To ActiveWorkbook.Sheets.Count
    If ActiveSheet.Name <> Sheets(sn).Name Then
    For rowx = 7 To 100
    If Sheets(sn).Cells(rowx, 2).Value <> "" Then
    ActiveSheet.Cells(outputrow, 1).Value = Sheets(sn).Name
    ActiveSheet.Cells(outputrow, 2).Value = Sheets(sn).Cells(rowx, 2).Value
    outputrow = outputrow + 1
    End If
    Next
    End If
    Next

    End Sub

    <table style="background-color:#0e54be" cellspacing="1" cellpadding="2"><td style="background-color:#ceffff;font-family:arial;color:#072c63;font-size:8pt;"> DALEY :P </td></table>

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com