Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Do Loop or use End iF for search string | Excel Discussion (Misc queries) | |||
compare cells, copy, loop | Excel Worksheet Functions | |||
VBA Loop to Find then Copy & Paste | Excel Discussion (Misc queries) | |||
copy,paste and loop through workbook | Excel Discussion (Misc queries) | |||
Find and Copy loop problem | Excel Discussion (Misc queries) |