View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Pulling rows from tabs to a "summary" sheet

I can't really say, it could be something "different" in xl2007.
I don't have that version to test the code on. The code works
for me when I add sheets First, Last and Data Pull to a workbook.
Of course, I adjusted the range width as versions prior to 07 do not
have a column ZQ.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Reck"
wrote in message
Thank you Jim. I put that into the macro, but when I try to run it I get the
run time error 1004; Application defined or Object Defined error. When I go
into the debugger it highlights the following lines:

Sheets(N).Range("J2:ZQ2").Copy Destination:= _
Sheets("Data Pull").Cells(Rows.Count, 1).End(xlUp)(2, 1)

I am very new to this type of thing, and am trying to learn as I go, so I'm
probably missing something very very basic. Any ideas?




"Jim Cone" wrote:
Sub RoundEmUpMoveEmOut()
Dim N As Long
Dim F As Long
Dim L As Long

F = Sheets("First").Index
L = Sheets("Last").Index

For N = F To L
Sheets(N).Range("J2:ZQ2").Copy Destination:= _
Sheets("Data Pull").Cells(Rows.Count, 1).End(xlUp)(2, 1)
Next
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Reck"
wrote in message
I have a workbook set-up to track sales information. Each individual tab is
dedicated to a single project, and I set it up so all the critical
information from each project is displayed in a "hidden" range from J2:ZQ2.
I need to pull this range from each project to a "Data Pull" tab so I can
then move the information to Access for analysis. Here's my issue...how can
I pull the range J2:ZQ2 from each sheet in the workbook between the tabs
called "First" and "Last" (which act as bookmarks for the individual project
tabs), and drop them into rows in the "Data Pull" tab? I am unsure how to
write a macro that can adjust to differing numbers of project tabs. At any
one time each workbook can have any varying number of current projects. Any
help would be greatly appreciated! Thanks in advance. (BTW, I have Office
Professional 2007)