#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 226
Default Not Looping

Hello,

For testing purposes, I've entered identical columns in both Oldbook (r, 5)
and Filename (r, 1). Instead of looping through noted area (which has no
blanks), it just writes the cell contents of the very first entry from
Oldbook (1, 5) to Filename (1, 1) - should be writing all of them in each
cell because each have matches.

Any thoughts on how I can get this to evaluate the whole column by way of
looping? I'm looking for it to write any match contents the same way it does
with the very first entry.

Thanks - Roger


Sub NotLooping()

Dim r As Long
r = 1
Do While Not IsEmpty(Cells(r, 10))

If Workbooks(Oldbook).ActiveSheet.Cells(r, 5).Value = _
Workbooks(Filename).Sheets("Sheet1").Cells(r, 1).Value Then

Workbooks(Filename).Sheets("Sheet1").Cells(r, 3).Value =
Workbooks(Oldbook).Sheets("Checklist Log").Cells(r, 5).Value

End If
r = r + 1
Loop

'Workbooks(Filename).Close
Application.ScreenUpdating = True
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
Looping a macro Sony Excel Discussion (Misc queries) 3 October 30th 06 11:52 AM
Looping David T Excel Discussion (Misc queries) 2 August 30th 06 10:51 PM
Looping Question lee New Users to Excel 3 August 4th 06 04:23 PM
for Looping in VBA/Form Excel 2003 - SPB Excel Discussion (Misc queries) 4 July 24th 06 03:01 PM
Looping through textboxes CLamar Excel Discussion (Misc queries) 1 July 12th 06 04:33 PM


All times are GMT +1. The time now is 02:48 PM.

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"