Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using transpose in a table (excel)

Status
Not open for further replies.

GovNewbi

Technical User
Jul 14, 2010
83
CA
I have a program that copies four cells from one workbook and is supose to pastespecial transpose them into a row of a table in another workbook. When this piece of code executes...


Set ws = ActiveSheet
Set wb = Workbooks.Open("P:\ODD\OSD\BO\CARE Cost & Operations Forms - CONFIDENTIAL\CARE Reporting by OSR & CSR Project ID\OSR " _
& Proj.Value & "\Reserves Data\OSR" & Proj.Value & "_" & ResYr.Value & "_RESERVES" & ".xls")
wb.Worksheets("Sheet1").Range("F19:F22").Copy
ws.Range("StFill").Offset(j, 0).PasteSpecial Transpose:=True

the values fill the entire table (duplicating themselves in each row). How do I get the values to only fill one row?
 


Hi,

How is the variable j, calculated & assigned?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
it works now... I don't know why because I haven't changed a thing but it is now running correctly. Thanks anyway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top