• 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

    Hui...

  • 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

AndyT88

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)

77363

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

>>> use code - tags <<<
Code:
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 = _
        "=IF(ISNA(MATCH(RC[-1],C[1],0)),"""",INDEX(C[1],MATCH(RC[-1],C[1],0)))"
        .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:
AndyT88
Please, reread Forum Rules
There are clear sentences about Cross-posting.
Those are for You too.
Ps. Same kind of rules are everywhere.
 
Back
Top