LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Picking data from another workbook


Tom,

Thanks for the assist but I have a problem.
I tried running it.
I even set up a book1.xls and book2.xls to run it
but I keep coming up with the same error

"Run-time error '91';
Object variable or With block variable not set"

The problem's at:

With bk1.Worksheets("Sheet1")
Set rng1 = .Range(.Cells(1, 3), _
.Cells(Rows.Count, 3).End(xlUp))
End With
rw = 1
rng2 = bk2.Worksheets("sheet1").Range("A2")
For Each cell In rng1
If LCase(cell.Value) = LCase(sCity) Then
cell.Offset(0, -2).Resize(1, 5) _
.Copy Destination:=rng2(rw)
rw = rw + 1
End If
Next

End Su

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

 
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
picking out matched data adam Excel Discussion (Misc queries) 0 December 2nd 09 08:29 PM
Picking up data from workbooks which may not exist yet robzrob Excel Worksheet Functions 3 July 30th 08 11:37 PM
Picking Data from another sheet Rich Excel Discussion (Misc queries) 1 May 8th 08 08:23 AM
Picking the list from data yshridhar Excel Worksheet Functions 2 November 13th 07 06:46 AM
Picking data Tudor Excel Worksheet Functions 2 June 14th 05 11:16 AM


All times are GMT +1. The time now is 12:37 PM.

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

About Us

"It's about Microsoft Excel"