LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default Workbook looping to many worksheets

Hi Dave,

Works perfectly! Thanks a ton for the help.

Regards,
Howard

"L. Howard Kittle" wrote in message
...
Hello Excel Experts and Users,

This code from Bernie Deitrick works fine for the example I provided in a
previous post.
It works because the sheets in test workbook B are named sheet1, sheet2,
sheet3 etc. The four columns in each row of data in Range("B2:E11") are
nicely transposed to the various sheets in book B.

In reality the names of the sheets in the real workbook B are names like
Adams, Allen, Brown, Cuyahoga, etc. A list of these names are in column A
of workbook A, Sheet1 A2:A11. (there are 88 names but I am using 10 in my
testing)

How can I pass these names to the PasteSpecial & Transpose code line
similar to how iSht increments the row number, except I get the next row
name each time.

Instead of ...Workbooks("B.xls").Worksheets("Sheet" & iSht). _
How can I ...Workbooks("B.xls").Worksheets("increment names 1 row at a
time"). _

Sub Reconstruct_To_Source()
Dim myRow As Range
Dim iSht As Integer

Application.ScreenUpdating = False

iSht = 1

For Each myRow In Workbooks("A.xls"). _
Worksheets("Sheet1").Range("B2:E11").Rows
myRow.Copy

Workbooks("B.xls").Worksheets("Sheet" & iSht). _
Range("IV5").End(xlToLeft).Offset(0, 1).PasteSpecial _
xlPasteValues, Transpose:=True

iSht = iSht + 1

Next myRow
Application.ScreenUpdating = True
Application.CutCopyMode = False
End Sub


Thanks for any help.
Regards,
Howard



 
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 column in workbook 1 to workbook 2's sheets L. Howard Kittle Excel Programming 6 March 15th 06 03:14 PM
Looping through Worksheets Steve Excel Programming 7 July 12th 05 07:56 PM
Looping worksheets in workbook Wylie C Excel Programming 2 March 18th 05 08:04 PM
Looping Through Worksheets In A Workbook Steve[_27_] Excel Programming 3 August 5th 03 03:40 PM
looping through worksheets alex Excel Programming 0 July 20th 03 06:43 PM


All times are GMT +1. The time now is 05:37 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"