search & copy with loop
try this instead to place values from col 5 into col 20 if col 16 ="NOT
FOUND" x=cells(65536,16) for each c in range(cells(2,16),cells(x,16)) if ucase(c)="NOT FOUND" then c.offset(0,4)=c.offset(0,-11) next -- Don Guillett SalesAid Software Granite Shoals, TX "Pit" wrote in message ... This Sub doesn't go, what i must change.Thanks in advance Sub search() n_riga = 2 Do While Cells(n_riga, 16) = "NOT FOUND" Cells(n_riga, 5).Select Selection.Copy Cells(n_riga, 20).Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlAdd, SkipBlanks:= _ False, Transpose:=False Application.CutCopyMode = False Selection.Copy Cells(n_riga, 5).Select Selection.Copy n_riga = n_riga + 1 Loop End Sub |
All times are GMT +1. The time now is 06:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com