Results 1 to 6 of 6

Copy Multiple filtered data to same column

Threaded View

  1. #1
    Registered User
    Join Date
    05-01-2013
    Location
    Cov, England
    MS-Off Ver
    Excel 2003
    Posts
    60

    Copy Multiple filtered data to same column

    Hi all

    I have a command button which filters data on worksheet "IdleTime" and copys the filtered data to to the worksheet "Idle Time M"
    The data is filtered by Month (selected by comboBox8 value) and the Time "8:00 PM"
    On "IdleTime" sheet Month is in Column 13 and time is in Column 2

    This code works fine, however i need to also Filter the "IdleTime" data with the same month (comboBox8 Value) but this time with the Time criteria "1:00 PM" Edit and criteria "Sat" (Field 14) . This filtered data needs to then be copied and pasted in the next free cell in "Idle Time M" after the data i had already pasted previously

    Currently having no luck trying to do this, please any help?

    Current Code which works for copy n paste for filtered data with just month and time 8pm
    Private Sub CommandButton12_Click()
    Dim iRow As Long
    
    If ComboBox8.Value = "" Then
    MsgBox "Please Select Month", vbExclamation, "Error"
    Me.ComboBox8.SetFocus
    Exit Sub
    End If
    If Not (Me.ComboBox8.Value = "April 13" Or Me.ComboBox8.Value = "May 13" Or Me.ComboBox8.Value = "June 13" Or Me.ComboBox8.Value = "July 13" Or Me.ComboBox8.Value = "August 13" Or Me.ComboBox8.Value = "September 13" Or Me.ComboBox8.Value = "October 13" Or Me.ComboBox8.Value = "November 13" Or Me.ComboBox8.Value = "December 13" Or Me.ComboBox8.Value = "January 14" Or Me.ComboBox8.Value = "February 14" Or Me.ComboBox8.Value = "March 14") Then
    MsgBox "Please Select Month From List", vbExclamation, "Idle Time"
    Me.ComboBox8.SetFocus
    Exit Sub
    End If
    
        Sheets("IdleTime").Select
        Cells.Select
        Selection.AutoFilter
        Selection.AutoFilter Field:=13, Criteria1:=UserForm1.ComboBox8.Value
        Selection.AutoFilter Field:=2, Criteria1:="8:00 PM"
        iRow = Cells(Rows.Count, "A").End(xlUp).Row
        Range("A1:L" & iRow).SpecialCells(xlCellTypeVisible).Copy
        Sheets("Idle Time M").Select
        Range("A2").Select
        ActiveSheet.Paste
        Sheets("IdleTime").Select
        Cells.Select
        Selection.AutoFilter
        Range("A2").Select
        Sheets("Idle Time M").Select
        Range("A2").Select
        MsgBox "Idle Time Summary", vbOKOnly + vbInformation, "Idle Time"
        Unload UserForm1
    End Sub
    Attached workbook aswell
    Edit: please see attached in my second post
    Command button 12 is located on phone performance summary Tab> Idle time/AQ Summary Tab> Idle Time summary Frame
    Attached Files Attached Files
    Last edited by flashdisk; 06-04-2013 at 02:05 AM.

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