Posts by ocgMax

    hi hope this might help

    Based on salesman? column B row 2? Cut and paste into other sheet?

    Try This

    im trying to hide row that are less than current month of last year. :fatwalk:

    WOW it works like magic!! thanks man!!
    my last question how to do "
    If someone has helped you, say "thank you" by clicking on their reputation button (*) below their name." :drum:


    I need to select row to color based on month, but my code only works for day "d" not month "m". It only will color the row that have the same date as today. here is my code. i have attach sample data to highlight it

    Re: Filter choice selection based on combobox values not working

    it work!!! but when i only search without select the category it error

    object variable or with block variable not set

    Quote from nyatiaju;800326

    Please paste following for ANZ:

    Re: Cut & Paste Data using Keywords to another Sheet (Macro)

    I have the full macro code and sample data in the attachment above. Can you please check it? :sailboat:

    Quote from nyatiaju;800145

    Below code did not show error:

    Re: Filter choice selection based on combobox values not working

    Quote from Kenneth Hobson;800106

    I would have to look into it more if you want to stick with the Find method. You can probably simplify your other routines similar to that below.

    It seems like you want a multiple field Autofilter with a Contains method for Field 1. e.g.

    Private Sub cbo_cat_Change()
      Dim r As Range
      Set r = Intersect(ActiveSheet.UsedRange, Range("A3:E" & Cells(Rows.Count, "A").End(xlUp).Row))
      ActiveSheet.AutoFilterMode = False
      With r
        If pos_txt <> "" Then .AutoFilter 1, "=*" & pos_txt & "*" 'Contains pos_txt
        If anz_txt <> "" Then .AutoFilter 3, anz_txt
        .AutoFilter 5, cbo_cat
      End With
    End Sub

    You r rocking sir