PDA

View Full Version : Comparing two cell range



johnnyexit
02-07-2019, 05:03 AM
I need you little help.

Can you show me code to compare e.g. value of cell A1(sheet1) with range of cell A1:A7(sheet2) and if it is equal put text to B1(sheet1) from text B1:B7 (sheet2)

2370923710

I need to pull data from sheet2 regarding the number on A1

Tnx in advance.

johnnyexit
02-07-2019, 05:49 AM
Something like this similar

Dim i As Integer
For i = 1 To 10
If Range("A" & i).Value = Range("B" & i).Value Then
Range("F" & i).Value = Range("A" & i).Value
End If
Next