I require some assistance with comparing columns and creating a checklist to confirm.
I want to have Column A as a check list to mark off all the compared columns to confirm it's good, so X for compare is correct.
For clarification i want compare column B and C, D and E, F and G, and so on. I may need more columns to compare also, but i can reuse the prior the code above
But when they do the compare for each two comparison, B and C vs D and E - if both are correct i need column A to have an X to show all the compares are matching. I've attached an excel document of the desired output.
If possible I need a macro to do this.
Your help is really appricated and thank you for your assistance on this matter. Vbaexpress forum is probably the best place to learn new stuff.
I have the following code here that works for one cell, but not so sure how to do for a range of cells..:S..it's a start?
[VBA]
Sub Test()
wsName = "Sheet1"
Worksheets("Sheet1").Activate
Dim FirstMatch As Boolean
Dim SecondMatch As Boolean
intColNum = 1
'For intRowCount = 1 To Sheets(wsName).Range("E").CurrentRegion.Rows.Count
If Range("B2").Value = Range("C2").Value Then
FirstMatch = True
Else
FirstMatch = False
End If
If Range("D2").Value = Range("E2").Value Then
SecondMatch = True
Else
SecondMatch = False
End If
If FirstMatch = True And SecondMatch = True Then
Range("A2").Value = "x"
ElseIf FirstMatch = False And SecondMatch = True Then
Range("A2").Value = "False"
ElseIf FirstMatch = False And SecondMatch = False Then
Range("A2").Value = "False"
ElseIf FirstMatch = True And SecondMatch = False Then
Range("A2").Value = "False"