vba: Horizontal List to Vertical with condition

Status
Not open for further replies.

gtd526

Well-known Member
Joined
Jul 30, 2013
Messages
684
Office Version
  1. 2019
Platform
  1. Windows
Hello, Im looking to convert a Horizontal list to a Vertical list with new a column for each "Week" in list.
Here is the data that needs to be converted:
NFL.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABBBCBDBEBFBGBHBIBJBKBLBMBNBOBPBQBRBSBTBUBVBWBXBYBZCACBCCCDCECFCGCHCICJCKCLCMCNCOCPCQCRCSCTCUCVCWCXCYCZDADBDCDDDEDFDGDHDIDJDKDLDMDNDODPDQDRDSDTDUDVDWDXDYDZEAEBECEDEEEFEGEHEIEJEKELEMENEOEPEQERESETEUEVEWEXEYEZFAFBFCFDFEFFFGFHFIFJFKFLFMFNFOFPFQFRFSFTFUFVFWFXFYFZGAGBGCGDGEGFGGGHGIGJGKGLGMGNGOGPGQGRGSGTGUGVGWGXGYGZHAHBHCHDHEHFHGHHHIHJHKHLHMHNHOHPHQHRHSHTHUHVHWHXHYHZIAIBICIDIEIFIGIHIIIJIKILIMINIOIPIQIRISITIUIVIWIXIYIZJAJBJCJDJEJFJGJHJIJJJKJLJM
1WeekHOUSEACLENYJOAKCHIINDGBMIAPHILACTBARZDALPITTENWeekCINNYGATLDETMINBUFSFLARDENCARJAXWASBALKCNENOWeekMIACHILARWASTENOAKSFCINHOUNYJCARDETTBDALGBKCWeekDENARZINDJAXCLENOMINSEALACPITBALNYGNEBUFPHIATLWeekTBCARCINJAXOAKDENARZPHIBUFLARMIAINDNYGMINLACWeekKCCINDETATLWASBALCLEHOUMIANYJGBLARARZWeekNYGDETPITNOCLEGBLACCARBUFDALSEAKCSFTBCHIWeekATLNETENOAKINDMINNYJLARJAXNOSFDALTBWeekGBDENSEABALHOUCARDETCHINYGOAKMIAPITNONEWeekINDTBHOUWASJAXPHICINBUFDENNYJSEASFBALMINWeekARZTENDETPHINEGBPITATLCINLACDALKCLARWeekHOUWASBALOAKLACNYGTENCLECARARZMIANOSFKCCHISEAWeekDALNODETINDCINJAXOAKWASCLELARNYGPHINEDENBUFWeekNEDENHOUDALGBTENKCARZMININDNYJATLNOWASPITBALWeekLACBUFCARHOUNYJDETTBJAXNECHICLESEAPHIKCSFPITWeekMINSFTBMIADENCLENYGCINCHIATLINDCARLARPHITENBUFWeekMIANOGBBALPITMINTENJAXLACNYJDALWASATLOAKARZSEA
21KCATLBALBUFCARDETJAXMINNEWASCINNOSFLARNYGDEN2CLECHIDALGBINDMIANYJPHIPITTBTENARZHOULACSEAOAK3JAXATLBUFCLEMINNENYGPHIPITINDLACARZDENSEANOBAL4NYJCARCHICINDALDETHOUMIATBTENWASLARKCOAKSFGB5CHIATLBALHOUKCNENYJPITTENWASSFCLEDALSEANO6BUFINDJAXMINNYGPHIPITTENDENLACTBSFDAL7PHIATLBALCARCINHOUMIANONYJWASARZDENNEOAKLAR8CARBUFCINCLEDETGBKCMIALACCHISEAPHINYG9SFATLBUFINDJAXKCMINTENWASLACARZDALTBNYJ10TENCARCLEDETGBNYGPITARZOAKMIALARNONECHI11SEABALCARCLEHOUINDJAXNOWASDENMINOAKTB12DETDALPITATLBUFCININDJAXMINNENYJDENLARTBGBPHI13BALATLCHIHOUMIAMINNYJPITTENARZSEAGBLACKCSF14LARCARCHICINDETJAXMIANYGTBOAKSEALACPHISFBUFCLE15OAKDENGBINDLARTENATLBALMIAMINNYGWASARZNODALCIN16NOARZDETOAKLACNYJBALHOUJAXKCPITWASSEADALGBNE17BUFCARCHICINCLEDETHOUINDKCNENYGPHITBDENLARSF
Raw

Each Column starts a new 'Week'.
The text order for each Column:
Column 1 = A1,A2,B1,B2,C1,C2,D1,D1,D2,etc
Column 2 = R1,R2,S1,S2,T1,T2,U1,U2,V1,V2,etc
Example of possible outcome:
NFL.xlsm
ABC
1WeekWeekWeek
2123
3HOUCINMIA
4KCCLEJAX
5SEANYGCHI
6ATLCHIATL
7CLEATLLAR
8BALDALBUF
Sheet1


thanks for your help!
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Will each week always be 17 columns and 2 rows?
 
Upvote 0
Duplicate Horizontal to Vertical

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,884
Messages
6,175,175
Members
452,615
Latest member
bogeys2birdies

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