Consulting

Results 1 to 6 of 6

Thread: Cut cells and move

  1. #1

    Cut cells and move

    Hi,

    I have a spreadsheet, and in one of the columns is a status of the request, once the status changes to closed the entire cell needs to be copied and moved to the last row which has the closed status. This would ideally mean that only open tickets with all other status except closed would be listed below.

    Two things that need to be accomplised:
    1) The entire Row colous should change
    2) It should cut the rows and paste it to the last row which has closed.

    Can this be done.

    I have attached a sample file for reference.

    Thanks
    Attached Files Attached Files

  2. #2
    VBAX Regular
    Joined
    Nov 2011
    Posts
    25
    Location
    Hi Satnair,

    Changing entire row color when status changed is possible by Conditional Formatting.....

    But why cutting & pasting is required to be in the last......

    Anyway.... if color for entire row is changed.. you can either filter it out based on closed status or color basis....

    Regards,

    MGM

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    Private Sub Worksheet_Change(ByVal Target As Range)

    On Error GoTo ws_exit

    Application.EnableEvents = False

    With Target

    If .Column = 8 Then

    If .Value = "Closed" Then

    Me.Rows(Target.Row).Cut
    Me.Rows(Me.Cells(Me.Rows.Count, "A").End(xlUp).Row + 1).Insert
    End If
    End If
    End With

    ws_exit:
    Application.EnableEvents = True
    End Sub
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  4. #4
    Thanks,

    I will check on this and revert for help if required.

    Bye.

  5. #5
    Hi,

    This works fine, only one issue is that if there are new request after the closed ones then this doesnot fall in line and the closed will be at the end.

    Can this be move to another worksheet may so that all the closed tickets are reflected in another worksheet and only the other incomplete ones remain on the active sheet.

    Thanks for help on this one.

    Attached the file for reference.



    Satnair
    Attached Files Attached Files

  6. #6
    Any help coming on this request please....

    Rgds.

Posting Permissions

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