COMPARING 7 COLUMN [Closed]

Report
Posts
1
Registration date
Saturday June 8, 2019
Status
Member
Last seen
June 8, 2019
-
Posts
2631
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
July 6, 2020
-
HI

I WOULD LIKE TO KNOW HOW TO COMPARE 7 DIFFERENT COLUMNS AND FIND COMMON VALUE IN NEW COLUMN

I'M ATTACHING ONE SAMPLE HERE

PLEASE CHECK AND GIVE ME FORMULA FOR THAT

THANKS

1 reply

Posts
2631
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
July 6, 2020
428
Hi Parshv,

Please refrain yourself from using all capitals and demanding help.

Here is a code that could help you out:
Sub RunMe()
Dim mFind As Range

For Each cell In Columns("A:A").SpecialCells(xlCellTypeConstants)
    Set mFind = Columns("B:B").Find(cell.Value)
    If mFind Is Nothing Then GoTo nCell
    Set mFind = Columns("C:C").Find(cell.Value)
    If mFind Is Nothing Then GoTo nCell
    Set mFind = Columns("D:D").Find(cell.Value)
    If mFind Is Nothing Then GoTo nCell
    Set mFind = Columns("E:E").Find(cell.Value)
    If mFind Is Nothing Then GoTo nCell
    Set mFind = Columns("F:F").Find(cell.Value)
    If mFind Is Nothing Then GoTo nCell
    Set mFind = Columns("G:G").Find(cell.Value)
    If mFind Is Nothing Then GoTo nCell
    Range("I" & Rows.Count).End(xlUp).Offset(1, 0) = cell.Value
nCell:
Next cell
End Sub


Best regards,
Trowa