Excel 2010compare multiple columns of data
Closed
DavidR
-
Oct 27, 2011 at 07:26 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Oct 27, 2011 at 10:17 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Oct 27, 2011 at 10:17 AM
Related:
- Excel 2010compare multiple columns of data
- Display two columns in data validation list but return only one - Guide
- Transfer data from one excel worksheet to another automatically - Guide
- Tmobile data check - Guide
- Excel marksheet - Guide
- Number to words in excel - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Oct 27, 2011 at 10:17 AM
Oct 27, 2011 at 10:17 AM
Hi DavidR,
Put the 6 columns of data in one column, now sort your data.
I assumed that your single column of data is in column A.
Using the follwing code will put the result in column B:
Best regards,
Trowa
Put the 6 columns of data in one column, now sort your data.
I assumed that your single column of data is in column A.
Using the follwing code will put the result in column B:
Sub test() Dim lRow1 As Integer Dim lRow2 As Integer lRow1 = Range("A" & Rows.Count).End(xlUp).Row For Each cell In Range("A1:A" & lRow1) If cell.Value = cell.Offset(1, 0).Value And _ cell.Value = cell.Offset(2, 0).Value And _ cell.Value = cell.Offset(3, 0).Value And _ cell.Value = cell.Offset(4, 0).Value And _ cell.Value = cell.Offset(5, 0).Value Then lRow2 = Range("B" & Rows.Count).End(xlUp).Offset(1, 0).Row cell.Copy Destination:=Range("B" & lRow2) End If Next End Sub
Best regards,
Trowa