Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Copy/Transpose into a matrix of merged cells. Use Offset formula orVBA ?

The test source is an Excel worksheet of 7 rows and 5 Cols inclusive
of headers.
I cannot use Transpose because the destination is a matrix of merged
rows.
Cell A1 of the source will go in the merged cells of A1:A4 in the
destination sheet.
Cell B1 of the source will go in the merged cells of A5:A8 in the
destination sheet, etc...
How do I accomplish this ?. I have been trying to use Offset formulas
without satisfaction.
Would VBA be the answer ? If so how ?
Note : the merged rows are a constant merge of 4 rows.
The source sheet does not have merged cells.
Help appreciated.
J.P.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default Copy/Transpose into a matrix of merged cells. Use Offset formulaor VBA ?

This should do it:

Sub TransposeToMergedCells()
Dim StartCell As Range
Dim DestCell As Range

Set StartCell = Worksheets("Sheet1").Range("A1") 'Source sheet
Set DestCell = Worksheets("Sheet2").Range("A1") 'Destination sheet

For c = 1 To 5
For r = 1 To 7
DestCell.Offset(0, r - 1) = StartCell.Offset(r - 1, c - 1)
Next
Set DestCell = DestCell.Offset(1, 0)
Next
End Sub

On 1 Okt., 17:41, u473 wrote:
The test source is an Excel worksheet of 7 rows and 5 Cols inclusive
of headers.
I cannot use Transpose because the destination is a matrix of merged
rows.
Cell A1 of the source will go in the merged cells of A1:A4 in the
destination sheet.
Cell B1 of the source will go in the merged cells of A5:A8 in the
destination sheet, etc...
How do I accomplish this ?. I have been trying to use Offset formulas
without satisfaction.
Would VBA be the answer ? If so how ?
*Note : the merged rows are a constant merge of 4 rows.
* * * * * *The source sheet does not have merged cells.
Help appreciated.
J.P.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Copy/Transpose into a matrix of merged cells. Use Offset formulaor VBA ?

You made my day.
Thank you, very, very much.
Reply
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
How can I transpose cells associated with a merged cell? rt_at_sea Excel Worksheet Functions 0 April 27th 09 09:53 AM
How to Offset to get past merged cells ? Fred Excel Programming 0 April 26th 07 05:59 PM
Merged cells .Offset(row,Col) inconsistancies Roy Peck Excel Programming 1 March 7th 07 02:07 PM
Offset and Merged cells Jim[_7_] Excel Programming 3 October 13th 06 04:21 PM
Offset function with merged cells MacroDaddy Excel Programming 1 January 8th 04 05:48 AM


All times are GMT +1. The time now is 01:33 AM.

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"