+ Reply to Thread
Results 1 to 4 of 4

Sortering & transfer rows

  1. #1
    Registered User
    Join Date
    10-03-2006
    Posts
    7

    Sortering & transfer rows

    I need a routine who sorter a list of data (like below) in a sheet1

    DATE TEXT TEXT TEXT NUMBER


    When the cell DATE match with the date i want , the row must copied in another sheet.


    Thanks

    Dionisios

  2. #2
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394

  3. #3
    Registered User
    Join Date
    10-03-2006
    Posts
    7

    something like this

    Dim mycell
    Dim rng As Range
    Dim rng2 As Range
    Set rng2 = Sheets("Sheet2").Cells(Rows.Count, 1).End(xlUp)
    Set rng = Sheets("sheet1").Range("C1:C30")
    For Each mycell In rng
    If mycell.Value < Date Then
    If Not IsEmpty(rng2) Then Set rng2 = rng2.Offset(1, 0)
    mycell.EntireRow.Copy Destination:=rng2
    End If
    Next mycell

    bat when i execute more than one times the routine , transfered rows , copied over olds.

  4. #4
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394
    Mate, I have got no idea what you are talking about. Why don't you post a spreadsheet with some sample data, and a second sheet that has the result you are trying to achieve.

    Matt

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1