Macro code to transpose specific cells in each row depending on text in that rows "Address" column

Ljwilli24

New Member
Joined
Jul 6, 2017
Messages
5
Hi all,

I am trying to transpose data in column B and column V of my spreadsheet. I need the cells to basically transpose each row of a spreadsheet in those columns (I need column B to transpose to the cells in columns C,D,E,F,G, and I need column V to transpose to the cells in columns W,X,Y,Z,AA). I need to transpose these cells in each row depending on the text that is in column AG (home address column)...if it is a duplicate address I need the cells in columns C,D,E,F,G that have the same address in column AG to be transposed into the first row with that address. I need the same to happen with the data in column V. I have column headers, but no row headers. The first chart is what I have currently (the column letters are indicated), the second chart is what I would like the macro to do. If anyone can help me with this I would really appreciate it. Thank you so much!

Lindsey

Column BColumn CColumn DColumn EColumn FColumn GColumn HColumn UColumn VColumn WColumn XColumn YColumn ZColumn AAColumn AG
AccountAccount 1Account 2Account 3Account 4Account 5Account 6NameName 1Name 2Name 3Name 4Name 5Name 6Address
123456 higgins 1234 barcleigh st
78967 higgins 1235 barcleigh st
98765 higgins 1236 barcleigh st
334657 higgins 1237 barcleigh st
765467 higgins 1238 barcleigh st
333333 higgins and smith 1239 barcleigh st
65435 clark 6754 french ave
88888 clark 6755 french ave
76546 goldstein 2967 fort lee dr.
82263 goldstein 2968 fort lee dr.
91236 stills 1 drake st.
Column BColumn CColumn DColumn EColumn FColumn GColumn HColumn UColumn VColumn WColumn XColumn YColumn ZColumn AAColumn AG
AccountAccount 1Account 2Account 3Account 4Account 5Account 6NameName 1Name 2Name 3Name 4Name 5Name 6Address
1234561234567896798765334657765467333333higginshigginshiggins and smithhiggins and frankshigginshigginshiggins and smith1234 barcleigh st
78967 higgins and smith 1235 barcleigh st
98765 higgins and franks 1236 barcleigh st
334657 higgins 1237 barcleigh st
765467 higgins 1238 barcleigh st
333333 higgins and smith 1239 barcleigh st
654356543588888 clarkclarkclark and bell 6754 french ave
88888 clark and bell 6755 french ave
765467654682263 goldsteingoldsteingoldstein 2967 fort lee dr.
82263 goldstein 2968 fort lee dr.
9123691236 stillsstills 1 drake st.
<colgroup><col width="74" style="width: 56pt; mso-width-source: userset; mso-width-alt: 2706;"> <col width="73" style="width: 55pt; mso-width-source: userset; mso-width-alt: 2669;"> <col width="75" style="width: 56pt; mso-width-source: userset; mso-width-alt: 2742;"> <col width="74" style="width: 56pt; mso-width-source: userset; mso-width-alt: 2706;"> <col width="81" style="width: 61pt; mso-width-source: userset; mso-width-alt: 2962;"> <col width="83" style="width: 62pt; mso-width-source: userset; mso-width-alt: 3035;" span="2"> <col width="116" style="width: 87pt; mso-width-source: userset; mso-width-alt: 4242;"> <col width="89" style="width: 67pt; mso-width-source: userset; mso-width-alt: 3254;"> <col width="116" style="width: 87pt; mso-width-source: userset; mso-width-alt: 4242;"> <col width="119" style="width: 89pt; mso-width-source: userset; mso-width-alt: 4352;"> <col width="89" style="width: 67pt; mso-width-source: userset; mso-width-alt: 3254;" span="2"> <col width="116" style="width: 87pt; mso-width-source: userset; mso-width-alt: 4242;"> <col width="125" style="width: 94pt; mso-width-source: userset; mso-width-alt: 4571;"> <tbody> </tbody>
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Also I just realized that when I dragged the addresses down it pasted them in a series. The addresses that are almost the same should be exactly the same. Sorry about that!
 
Upvote 0
Oh gosh...I really put the wrong info in my explanation too...if anyone is still with me and reading this please refer to this instead of the main posting. Basically when I said "Column V" it should have been "Column U".

I am trying to transpose data in column B and column U of my spreadsheet. I need the cells to basically transpose each row of a spreadsheet in those columns (I need column B to transpose to the cells in columns C,D,E,F,G,H and I need column U to transpose to the cells in columns V,W,X,Y,Z,AA). I need to transpose these cells in each row depending on the text that is in column AG (home address column)...if it is a duplicate address I need the cells in columns C,D,E,F,G,H that have the same address in column AG to be transposed into the first row with that address. I need the same to happen with the data in column U. I have column headers, but no row headers. The first chart is what I have currently (the column letters are indicated), the second chart is what I would like the macro to do. If anyone can help me with this I would really appreciate it. Thank you so much!
 
Upvote 0

Forum statistics

Threads
1,213,506
Messages
6,114,024
Members
448,543
Latest member
MartinLarkin

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