i didn't posted the screenshot, its because, u already understood and posted exactly what i need,
But of course if you had posted such a screen shot first I wouldn't have had to make that post to ask if I had the right idea.
Also, other helpers may have already looked before me and just pased on because they weren't quite sure of your data and layout.
This seems a strange request since we are searching for values next to A and B and then reporting A and B in Sheet3. Could we just go straight to Sheet3 and put A and B in A10 and A11?
In case for some reason the answer is 'No', try this modification (though it seems a lot of extra work to extract something we already know we are looking for). It does assume Excel 2007 or later.
<font face=Courier New><br><SPAN style="color:#00007F">Sub</SPAN> fari1()<br> <SPAN style="color:#00007F">Dim</SPAN> a, b, y<br> <SPAN style="color:#00007F">Dim</SPAN> i <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, c <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, UBa <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, d <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN><br> <SPAN style="color:#00007F">Dim</SPAN> bGo <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Boolean</SPAN><br> <br> <SPAN style="color:#00007F">With</SPAN> Sheets("Sheet1")<br> a = .Range("A2", .Range("C" & .Rows.Count).End(xlUp))<br> UBa = <SPAN style="color:#00007F">UBound</SPAN>(a, 1)<br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN><br> <SPAN style="color:#00007F">ReDim</SPAN> b(1 <SPAN style="color:#00007F">To</SPAN> UBa, 1 <SPAN style="color:#00007F">To</SPAN> 1)<br> <SPAN style="color:#00007F">ReDim</SPAN> y(1 <SPAN style="color:#00007F">To</SPAN> UBa, 1 <SPAN style="color:#00007F">To</SPAN> 1)<br> <SPAN style="color:#00007F">For</SPAN> i = 1 <SPAN style="color:#00007F">To</SPAN> UBa<br> <SPAN style="color:#00007F">If</SPAN> a(i, 1) = "" <SPAN style="color:#00007F">Then</SPAN><br> <SPAN style="color:#00007F">If</SPAN> bGo <SPAN style="color:#00007F">Then</SPAN><br> c = c + 1<br> b(c, 1) = a(i, 3)<br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br> <SPAN style="color:#00007F">Else</SPAN><br> bGo = (a(i, 1) = "A" <SPAN style="color:#00007F">Or</SPAN> a(i, 1) = "B")<br> <SPAN style="color:#00007F">If</SPAN> bGo <SPAN style="color:#00007F">Then</SPAN><br> d = d + 1<br> y(d, 1) = a(i, 1)<br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br> <SPAN style="color:#00007F">Next</SPAN> i<br> <SPAN style="color:#00007F">With</SPAN> Sheets("Sheet2")<br> c = .Range("A" & .Rows.Count).End(xlUp).Row<br> .Range("A20:A" & IIf(c < 20, 20, c)).ClearContents<br> .Range("A20").Resize(UBa).Value = b<br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN><br> <SPAN style="color:#00007F">With</SPAN> Sheets("Sheet3")<br> c = .Range("A" & .Rows.Count).End(xlUp).Row<br> .Range("A10:A" & IIf(c < 10, 10, c)).ClearContents<br> <SPAN style="color:#00007F">With</SPAN> .Range("A10").Resize(UBa)<br> .Value = y<br> .RemoveDuplicates Columns:=1, Header:=xlNo<br> .SpecialCells(xlCellTypeBlanks).Delete Shift:=xlUp<br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN><br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br></FONT>