Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do Loop or use End iF for search string RGreen Excel Discussion (Misc queries) 4 September 1st 09 12:59 AM
compare cells, copy, loop Immortal_Creations Excel Worksheet Functions 2 July 17th 09 03:34 PM
VBA Loop to Find then Copy & Paste B J Hankinson Excel Discussion (Misc queries) 0 April 15th 09 06:39 PM
copy,paste and loop through workbook TUNGANA KURMA RAJU Excel Discussion (Misc queries) 0 December 6th 05 12:31 PM
Find and Copy loop problem BillyJ Excel Discussion (Misc queries) 3 November 2nd 05 07:16 PM


All times are GMT +1. The time now is 01:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"