Transpose + Skip Columns

laurawqf

New Member
Joined
Sep 5, 2017
Messages
2
Hello!

I would like to transpose a column of data from one sheet to the row of a second sheet, but have the data skip every 4th column.

So from 'Sheet1' I'd like to transpose E2:E325 to 'Sheet2" starting at N4, then R4, V4, Z4, etc.

I can get the transpose function to work just fine, but I cannot figure out how to skip columns in the target sheet.

Thanks!
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Try this:-
Code:
[COLOR="Navy"]Sub[/COLOR] MG06Sep36
[COLOR="Navy"]Dim[/COLOR] Rng [COLOR="Navy"]As[/COLOR] Range, Dn [COLOR="Navy"]As[/COLOR] Range, c [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
c = 14
[COLOR="Navy"]Set[/COLOR] Rng = Sheets("Sheet1").Range("E2:E325")
[COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Dn [COLOR="Navy"]In[/COLOR] Rng
    Sheets("Sheet2").Cells(4, c).Value = Dn.Value
    c = c + 4
[COLOR="Navy"]Next[/COLOR] Dn
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0
Assuming no data on Row 4, Sheet2 starting at Column N, give this macro a try...
Code:
[table="width: 500"]
[tr]
	[td]Sub TransposeAndSkip()
  Dim Arr As Variant
  Arr = Split(Join([TRANSPOSE(Sheet1!E2:E6)], Chr(1) & Chr(1) & Chr(1)) & Chr(1), Chr(1))
  Sheets("Sheet2").Range("N4").Resize(, UBound(Arr) + 1) = Arr
End Sub[/td]
[/tr]
[/table]
 
Upvote 0
Assuming no data on Row 4, Sheet2 starting at Column N, give this macro a try...
Code:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Sub TransposeAndSkip()
  Dim Arr As Variant
  Arr = Split(Join([TRANSPOSE(Sheet1!E2:E6)], Chr(1) & Chr(1) & Chr(1)) & Chr(1), Chr(1))
  Sheets("Sheet2").Range("N4").Resize(, UBound(Arr) + 1) = Arr
End Sub[/TD]
[/TR]
</tbody>[/TABLE]

This worked great thank you!

I'm a bit scared to ask on an excel forum, but my team informed me they need this data re-done in google sheets. I don't suppose you'd be able to write the same macro in google apps script/javascript?
 
Upvote 0
This worked great thank you!
You are welcome.


I'm a bit scared to ask on an excel forum, but my team informed me they need this data re-done in google sheets. I don't suppose you'd be able to write the same macro in google apps script/javascript?
Sorry, but I know absolutely nothing about Google Sheets... never used it. Maybe someone who knows about it will visit this thread and help you out.
 
Upvote 0

Forum statistics

Threads
1,223,785
Messages
6,174,539
Members
452,571
Latest member
MarExcelTips

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top