Posts by dangle

    Re: Copy Cells to Sheet Based on Column Name

    Something like this maybe:

    Re: Search for new line of data, ignoring first column

    For example:

    ws.Cells(iRow, 1).Value = Me.txtID_N.Value & " " & Me.txtSURNAME.Value

    Remember to wrap your code in code tags and ask new questions in a different thread. To help people give a solution, please post sample data in a workbook.

    Re: Maximising use of AutoFilter

    Something to play around with (not tested):

    Re: Maximising use of AutoFilter

    Apologies, I misunderstood.

    You will either have to use Advanced Filter or a slightly more involved macro with autofilter. Does it have to be filtered in place or can it be copied to another sheet? Can it only be through a macro?

    Re: Adding a If criteria within a Do Loop

    It looks like you have wrapped your additional 'if' statement around your 'if ... exit do' statement. Therefore if there is a cell which does not meet the "No" condition, your sub won't be able to test the 'firstadd' condition and will go into the infinite loop. So you need to move the end of the additional 'if' statement so it does not cover the 'if ... exit do' statement.
    Why not use 'autofilter' instead of doing this loops? I think this would be easier than the method you are using. Also, please provide sample data so that it is easier to advise.

    Re: Slow macro due to Copy and Paste Special


    There could be a number of ways to do this, maybe even just using Excel depending on how your data is set up and if the solution does not have to be a macro.

    Can you upload a small sample workbook with original data and desired output?

    What version of Excel are you using?

    Re: Reorder columns by name + Wildcard?


    I am not quite sure I've understood, so maybe one of:

    columnMatch = Application.Match("*" & orderedHeadings(i) & "*", Range("1:1"), 0)
    columnMatch = Application.Match(Left(orderedHeadings(i), 3) & "*", Range("1:1"), 0)
    columnMatch = Application.Match(Left("*" & orderedHeadings(i), 3) & "*", Range("1:1"), 0)

    I assume you will change the match strings to remove spaces.

    Re: A Macro For Various Data Corrections From List

    OK. To match to column B, try:

    Re: Select unique matches among multiple possibilities

    Not sure if you are still looking for a VBA solution but this might help:

    Re: A Macro For Various Data Corrections From List

    I think it's just (not tested):

    Re: Macro Run Time Error 13: Mismatch

    I think there must be some errors in the data itself.


    Re: Macro help find duplicates in two columns


    Does this give you what you need?