Sub Test()
For Each cel In Sheets("Sheet1").Range("C3:I8")
If cel.Value = 5229 Then Sheets("Sheet1").Range("A" & cel.Row).Copy Sheets("Sheet4").Cells(Rows.Count, "B").End(xlUp).Offset(1)
Next
End Sub
Good morning,
I would like to know how to write an IF statement that is capable to do the following:
=IF(C3:I8)(Sheet1) contains "5229" then copy A3 of same row(Sheet1) and paste to (Sheet4) B2
Any ideas?
Hi
C3:I8 contain cells that list a number. I've been using 5229 as an example. (several duplicates of numbers will be in this array but only one per cell)
A3:A8 contain peoples names. (no names are duplicated)
If C3:I8 contains 5229 then same row column A would be pasted on different sheet, say Sheet4 B2. If multiple names need to be placed in cell B2 could they appear as a list?