• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Matching columns and retaining result data


New Member
I have a complete list of all sample ID's in column 1.

Column C shows the samples that have been tested for pH (and thier corresponding result in column D)


Column B is a duplicate list which inserts blanks using the following VBA code:

>>> use code - tags <<<
Sub Listduplicates()
    Dim rngA As Range
    Set rngA = Range([A1], Cells(Rows.Count, "A").End(xlUp))
    rngA.Offset(0, 1).Columns.Insert
    With rngA.Offset(0, 1)
        .FormulaR1C1 = _
        .Value = .Value
    End With
End Sub
The question: How do I now get the pH result (column D) to match with its corresponding Sample ID in column A?

Any help will be greatly appriciated. Many Thanks.
Last edited by a moderator:
Please, reread Forum Rules
There are clear sentences about Cross-posting.
Those are for You too.
Ps. Same kind of rules are everywhere.