Posts by epoiezam

    Hi Guys,,


    Need your help.. How to make this formula works with .csv file/s.
    Thank you [Blocked Image: https://www.mrexcel.com/forum/images/smilies/icon_smile.gif]


    Dim fso As Object
    Dim fld As Object
    Dim strSearch As String
    Dim strPath As String
    Dim strFile As String
    Dim wOut As Worksheet
    Dim wbk As Workbook
    Dim wks As Worksheet
    Dim lRow As Long
    Dim rFound As Range
    Dim strFirstAddress As String



    On Error GoTo ErrHandler
    Application.ScreenUpdating = False
    Application.Visible = False


    'Change as desired
    strPath = UserForm1.Label44.Caption
    strSearch = UserForm1.TextBox1.Value


    lRow = 3
    With Sheet2


    Set fso = CreateObject("Scripting.FileSystemObject")
    Set fld = fso.GetFolder(strPath)



    strFile = Dir(strPath & "\*.xlsx")
    Do While strFile <> ""
    Set wbk = Workbooks.Open _
    (Filename:=strPath & "" & strFile, _
    UpdateLinks:=0, _
    ReadOnly:=True, _
    AddToMRU:=False)


    Application.Visible = False


    For Each wks In wbk.Worksheets
    Set rFound = wks.UsedRange.Find(strSearch) ' find all in sheet



    If Not rFound Is Nothing Then
    strFirstAddress = rFound.Address
    End If
    Do
    If rFound Is Nothing Then
    Exit Do
    Else
    lRow = lRow + 1


    .Cells(lRow, 6).EntireRow.Value = rFound.EntireRow.Value
    End If
    Set rFound = wks.Range("K:K").FindNext(After:=rFound) ' column = Range("K:K"), all = Cells
    Loop While strFirstAddress <> rFound.Address
    Next



    wbk.Close (True)
    strFile = Dir


    Loop
    Application.Visible = False
    .Columns("A:D").EntireColumn.AutoFit
    End With
    'MsgBox "Done"




    ExitHandler:
    Set wOut = Nothing
    Set wks = Nothing
    Set wbk = Nothing
    Set fld = Nothing
    Set fso = Nothing
    Application.ScreenUpdating = True
    Exit Sub



    ErrHandler:
    MsgBox Err.Description, vbExclamation
    Resume ExitHandler

    Hi Guys:


    Need your help here,


    How to color code ZONE column according to their respective REGION
    (as per sample below)


    [TABLE="class: cms_table_grid, width: 500"]

    [tr]


    [td]

    Region

    [/td]


    [td]

    Zone

    [/td]


    [td]

    Branch

    [/td]


    [/tr]


    [tr]


    [td]

    North

    [/td]


    [td]

    North A

    [/td]


    [td]

    Branch NA1

    [/td]


    [/tr]


    [tr]


    [td][/td]


    [td]

    North B

    [/td]


    [td]

    Branch NB1

    [/td]


    [/tr]


    [tr]


    [td][/td]


    [td]

    North C

    [/td]


    [td]

    Branch NC1

    [/td]


    [/tr]


    [tr]


    [td]

    West

    [/td]


    [td]

    West A

    [/td]


    [td]

    Branch WA1

    [/td]


    [/tr]


    [tr]


    [td][/td]


    [td]

    West B

    [/td]


    [td]

    Branch WB1

    [/td]


    [/tr]


    [tr]


    [td]

    East

    [/td]


    [td]

    East A

    [/td]


    [td]

    Branch EA1

    [/td]


    [/tr]


    [tr]


    [td]

    South

    [/td]


    [td]

    South A

    [/td]


    [td]

    Branch SA1

    [/td]


    [/tr]


    [tr]


    [td]


    [/td]


    [td]

    South B

    [/td]


    [td]

    Branch SB1

    [/td]


    [/tr]


    [tr]


    [td][/td]


    [td]

    South C

    [/td]


    [td]

    Branch SC1

    [/td]


    [/tr]


    [/TABLE]



    Thank you veru much in advance guys [Blocked Image: http://www.vbaexpress.com/forum/images/smilies/001.gif]

    Hi Guys:


    Need your help.


    Sheet1
    [TABLE="class: cms_table_grid, width: 500"]

    [tr]


    [td]

    Customer's Name

    [/td]


    [td]

    No of Engagement

    [/td]


    [/tr]


    [tr]


    [td]

    Joe

    [/td]


    [td]

    1

    [/td]


    [/tr]


    [tr]


    [td]

    Charles

    [/td]


    [td]

    2

    [/td]


    [/tr]


    [tr]


    [td]

    Henry

    [/td]


    [td]

    1

    [/td]


    [/tr]


    [tr]


    [td]

    Joe

    [/td]


    [td]

    2

    [/td]


    [/tr]


    [/TABLE]


    Sheet2
    [TABLE="class: cms_table_grid, width: 500"]

    [tr]


    [td]

    Customer's Name

    [/td]


    [/tr]


    [tr]


    [td]

    Joe

    [/td]


    [/tr]


    [tr]


    [td]

    Henry

    [/td]


    [/tr]


    [/TABLE]



    If there is a match between (Sheet1 - Column A) and (Sheet2 - Column A) the Result will be something like Sheet3 below


    Sheet3
    [TABLE="class: cms_table_grid, width: 500"]

    [tr]


    [td]

    Customer's Name

    [/td]


    [td]

    No of Engagement

    [/td]


    [/tr]


    [tr]


    [td]

    Joe

    [/td]


    [td]

    3

    [/td]


    [/tr]


    [tr]


    [td]

    Henry

    [/td]


    [td]

    1

    [/td]


    [/tr]


    [/TABLE]


    Thank you in advance guys.

    Re: VBA Excel - Multiple Combobox - Set Blank = &quot;All&quot; (epoiezam)


    Quote from pike;764156

    Hello
    Welcome to the forum
    maybe something like..


    Hi Pike:


    First.. Thank you so much for responding.
    In this scenario, I need "blank" to equal to "All"
    Is that possible ?


    Sample of required outcome in Table A below:-


    If:
    Combo1 = Matured Adult (A3)
    Combo2 = "Blank" (A4)
    Combo3 = MASS (A5)


    When Combo2 "blank", it will display all values (column A4)
    Same goes with the rest of the combos. If no value selected ("blank").
    It will read as "All".



    Table A


    [TABLE="class: outer_border, width: 500"]

    [tr]


    [td][/td]


    [td]

    A3

    [/td]


    [td]

    A4

    [/td]


    [td]

    A5

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    1

    [/td]


    [td]

    Matured Adult

    [/td]


    [td]

    A

    [/td]


    [td]

    MASS

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    2

    [/td]


    [td]

    Matured Adult

    [/td]


    [td]

    A

    [/td]


    [td]

    MASS

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    3

    [/td]


    [td]

    Matured Adult

    [/td]


    [td]

    B

    [/td]


    [td]

    MASS

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    4

    [/td]


    [td]

    Matured Adult

    [/td]


    [td]

    B

    [/td]


    [td]

    MASS

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    5

    [/td]


    [td]

    Matured Adult

    [/td]


    [td]

    C

    [/td]


    [td]

    MASS

    [/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    6

    [/td]


    [td]

    Matured Adult

    [/td]


    [td]

    C

    [/td]


    [td]

    MASS

    [/td]


    [td][/td]


    [/tr]


    [/TABLE]




    Thanks again Pike :)

    Hi guys:


    In a bit of a jammed here, really you can help.
    I pasted down my script below for your easy viewing. (it's a sample, overall I have 10 comboboxes)


    I don't have any prob when all of the comboboxes are selected (not equal to blank). it works beautifully.
    But when I leaved some blank. Then the filter doesn't worked.


    Thank you in advance for your kind help. :smile: