Compare values in two columns and return the value from third
Closed
Wasim
-
Mar 9, 2016 at 08:02 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Mar 10, 2016 at 07:27 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Mar 10, 2016 at 07:27 AM
Related:
- Compare values in two columns and return the value from third
- Display two columns in data validation list but return only one - Guide
- Beyond compare - Download - File management
- Which function is used to compare a cell value to an array of cells and return a value that matches the location of the value in the array, and is used when there are more than two columns in the array ✓ - Excel Forum
- If cell contains date then return value ✓ - Excel Forum
- If two cells match return value from third excel ✓ - Excel Forum
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Mar 10, 2016 at 07:27 AM
Mar 10, 2016 at 07:27 AM
suppose data like this
col2 col3 col4 col1
x y f t
w w x s
c t c d
d y v f
x y g u
x y y n
q w m j
e r l k
t y k l
try this macro
col2 col3 col4 col1
x y f t
w w x s
c t c d
d y v f
x y g u
x y y n
q w m j
e r l k
t y k l
try this macro
Sub test()
Dim col1, col2, ccol
Set col1 = Range(Range("A2"), Range("A2").End(xlDown))
For Each ccol In col1
If ccol = "x" And ccol.Offset(0, 1) = "y" Then
ccol.Offset(0, 3) = ccol.Offset(0, 2)
End If
Next ccol
End Sub