Thread
:
search & copy with loop
View Single Post
#
1
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
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 With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]