COMPARING 7 COLUMN

Posts
1
Registration date
Saturday June 8, 2019
Status
Member
Last seen
June 8, 2019
- - Latest reply: TrowaD
Posts
2483
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
June 13, 2019
- Jun 13, 2019 at 12:09 PM
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
See more 

1 reply

Posts
2483
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
June 13, 2019
354
0
Thank you
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

Respond to TrowaD