View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dianne Dianne is offline
external usenet poster
 
Posts: 107
Default Transposing one column into three

OK, I think I understand now... You want to collect that data in an
existing worksheet rather than creating a brand new one? If so, assuming
the existing worksheet is called "Priorities", change:

Set ws = ActiveSheet
ActiveWorkbook.Worksheets.Add
Set wsNew = ActiveSheet

to

Set ws = ActiveSheet
Set wsNew = ActiveWorkbook.Worksheets("Priorities")

If your worksheet is not called Priorities, then just change
Worksheets("Priorities") to Worksheets("WhateverYourSheetNameIs").

Also, if you didn't want the restriction of running the macro from the
sheet where your data is held, you can change

Set ws = ActiveSheet

to

Set ws = ActiveWorkbook.Worksheets("NameOfSheetWithData")

Let me know if I've misunderstood what you want.

--
HTH,
Dianne


In ,
Gilbert typed:
Dianne,
When I run your macro I get the result in a spreadsheet named
"sheet1" it basically creates a worksheet. I 've checked three times
and it looks like teh macro replaces my existing worksheet with the
new one. I still need my source data to retriene other elements of
information.

Thanks