Transpose Addresses in Column to Row

Oh_man

New Member
Joined
May 27, 2014
Messages
2
Hi,

I'm trying to transpose addresses in my "Address" column to a row and then scan down to the next block and repeat.

If I can have my cake and eat it too, then it'd be awesome to have the dissimilar (shorter) addresses lined up with the longer ones. I.e. those without a suite or room number would match those that have it and would simply not have and data in the "address 2" field. (3 fields used vs 4 fields used)

I've tried hacking peoples scripts from other projects(searching google) and some formulas, but I'm just not understanding it and am open to any suggestions at this point.

Thanks,
Chris

data looks like this:
Name
Address
Address2
City
Country
Office1
3532 Hayden Ave

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Office1
Beverly Hills, CA 90210

<colgroup><col width="152"></colgroup><tbody>
</tbody>

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Office1

<colgroup><col width="146"></colgroup><tbody>
</tbody>
USA

<colgroup><col width="78"></colgroup><tbody>
</tbody>
Office2
2000 Avenue Of The Stars

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Office2
Ste 212

<colgroup><col width="146"></colgroup><tbody>
</tbody>

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Office2
Beverly Hills, CA 90212

<colgroup><col width="146"></colgroup><tbody>
</tbody>

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Office2
USA

<colgroup><col width="78"></colgroup><tbody>
</tbody>

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Office3
350 S Beverly Dr

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Office3
London WC2H 8DL

<colgroup><col style="width: 146px"></colgroup><tbody>
</tbody>

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Office3
UK

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Office4
9111 Wilshire Blvd

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Office4
Vancouver, BC V5K 1P3
Office4
Canada

<colgroup><col width="146"></colgroup><tbody>
</tbody>

<colgroup><col width="146"></colgroup><tbody>
</tbody>

<tbody>
</tbody>


























I'm trying to make it look like this:
Name
Address
Address2
City
Country
Office1
3532 Hayden Ave

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Beverly Hills, CA 90210
USA
Office1

<colgroup><col width="152"></colgroup><tbody>
</tbody>

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Office1
Office2
2000 Avenue Of The Stars

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Ste 212
Beverly Hills, CA 90212
USA
Office2

<colgroup><col width="146"></colgroup><tbody>
</tbody>

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Office2

<colgroup><col width="146"></colgroup><tbody>
</tbody>

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Office2

<colgroup><col width="78"></colgroup><tbody>
</tbody>

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Office3
350 S Beverly Dr

<colgroup><col width="146"></colgroup><tbody>
</tbody>
London WC2H 8DL
UK
Office3

<colgroup><col style="width: 146px"></colgroup><tbody>
</tbody>

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Office3

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Office4
9111 Wilshire Blvd

<colgroup><col width="146"></colgroup><tbody>
</tbody>
Vancouver, BC V5K 1P3
Canada

<tbody>
</tbody>
Office4
Office4

<colgroup><col width="146"></colgroup><tbody>
</tbody>

<colgroup><col width="146"></colgroup><tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hello Chris

ABCDEFGHI
1NameAddress FieldHelperHelperHelperAddressAddress2CityCountry
2Office13532 Hayden Ave3113532 Hayden Ave Beverly Hills, CA 90210USA
3Office1Beverly Hills, CA 90210321
4Office1USA331
5Office22000 Avenue Of The Stars4142000 Avenue Of The StarsSte 212Beverly Hills, CA 90210USA
6Office2Ste 212424
7Office2Beverly Hills, CA 90210434
8Office2USA444
9Office3350 S Beverly Dr318350 S Beverly Dr London WC2H 8DLUK
10Office3London WC2H 8DL328
11Office3UK338
12Office49111 Wilshire Blvd31119111 Wilshire Blvd Vancouver, BC V5K 1P3Canada
13Office4Vancouver, BC V5K 1P33211
14Office4Canada3311

<colgroup><col style="width: 28ptpx"><col width="39pt"><col width="123,75pt"><col width="36,75pt"><col width="36,75pt"><col width="36,75pt"><col width="123,75pt"><col width="48pt"><col width="112,5pt"><col width="42pt"></colgroup><tbody>
</tbody>

ZelleFormel
C2=COUNTIF($A$2:$A$14,A2)
D2=COUNTIF($A$2:A2,A2)
E2=MATCH(A2,$A$2:$A$14,0)
F2=IF(D2=1,INDEX($B$2:$B$14,E2),"")
G2=IF(C2=4,IF(D2=1,INDEX($B$2:$B$14,E2+1),""),"")
H2=IF(C2=4,IF(D2=1,INDEX($B$2:$B$14,E2+2),""),IF(D2=1,INDEX($B$2:$B$14,E2+1),""))
I2=IF(C2=4,IF(D2=1,INDEX($B$2:$B$14,E2+3),""),IF(D2=1,INDEX($B$2:$B$14,E2+2),""))

<colgroup><col style="width: 40ptpx"><col></colgroup><tbody>
</tbody>
Diese Tabelle wurde mit Tab2Html (v2.4.1) erstellt. ©Gerd alias Bamberg

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,216,105
Messages
6,128,861
Members
449,472
Latest member
ebc9

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