Dazzawm
Well-known Member
- Joined
- Jan 24, 2011
- Messages
- 3,786
- Office Version
- 365
- Platform
- Windows
Is there any way that when I select a range of cells the data will swap places?
i.e if i select the range A1:J5 I want it to change the data over as below on the same sheet
Before
<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Calibri,Arial; FONT-SIZE: 11pt" border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style="WIDTH: 30px"><COL style="WIDTH: 45px"><COL style="WIDTH: 45px"><COL style="WIDTH: 45px"><COL style="WIDTH: 45px"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><COL style="WIDTH: 67px"><COL style="WIDTH: 67px"><COL style="WIDTH: 67px"><COL style="WIDTH: 67px"></COLGROUP><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt"><TD> </TD><TD>A</TD><TD>B</TD><TD>C</TD><TD>D</TD><TD>E</TD><TD>F</TD><TD>G</TD><TD>H</TD><TD>I</TD><TD>J</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">1</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD> </TD><TD> </TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">2</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD> </TD><TD> </TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">3</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD> </TD><TD> </TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">4</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD> </TD><TD> </TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">5</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD> </TD><TD> </TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD></TR></TBODY></TABLE>
After
<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Calibri,Arial; FONT-SIZE: 11pt" border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style="WIDTH: 30px"><COL style="WIDTH: 67px"><COL style="WIDTH: 67px"><COL style="WIDTH: 67px"><COL style="WIDTH: 67px"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><COL style="WIDTH: 45px"><COL style="WIDTH: 45px"><COL style="WIDTH: 45px"><COL style="WIDTH: 45px"></COLGROUP><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt"><TD> </TD><TD>A</TD><TD>B</TD><TD>C</TD><TD>D</TD><TD>E</TD><TD>F</TD><TD>G</TD><TD>H</TD><TD>I</TD><TD>J</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">1</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD> </TD><TD> </TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">2</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD> </TD><TD> </TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">3</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD> </TD><TD> </TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">4</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD> </TD><TD> </TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">5</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD> </TD><TD> </TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD></TR></TBODY></TABLE>
i.e if i select the range A1:J5 I want it to change the data over as below on the same sheet
Before
<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Calibri,Arial; FONT-SIZE: 11pt" border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style="WIDTH: 30px"><COL style="WIDTH: 45px"><COL style="WIDTH: 45px"><COL style="WIDTH: 45px"><COL style="WIDTH: 45px"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><COL style="WIDTH: 67px"><COL style="WIDTH: 67px"><COL style="WIDTH: 67px"><COL style="WIDTH: 67px"></COLGROUP><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt"><TD> </TD><TD>A</TD><TD>B</TD><TD>C</TD><TD>D</TD><TD>E</TD><TD>F</TD><TD>G</TD><TD>H</TD><TD>I</TD><TD>J</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">1</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD> </TD><TD> </TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">2</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD> </TD><TD> </TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">3</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD> </TD><TD> </TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">4</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD> </TD><TD> </TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">5</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD> </TD><TD> </TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD></TR></TBODY></TABLE>
After
<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Calibri,Arial; FONT-SIZE: 11pt" border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style="WIDTH: 30px"><COL style="WIDTH: 67px"><COL style="WIDTH: 67px"><COL style="WIDTH: 67px"><COL style="WIDTH: 67px"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><COL style="WIDTH: 45px"><COL style="WIDTH: 45px"><COL style="WIDTH: 45px"><COL style="WIDTH: 45px"></COLGROUP><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt"><TD> </TD><TD>A</TD><TD>B</TD><TD>C</TD><TD>D</TD><TD>E</TD><TD>F</TD><TD>G</TD><TD>H</TD><TD>I</TD><TD>J</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">1</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD> </TD><TD> </TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">2</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD> </TD><TD> </TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">3</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD> </TD><TD> </TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">4</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD> </TD><TD> </TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">5</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD>GOODBYE</TD><TD> </TD><TD> </TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD><TD>HELLO</TD></TR></TBODY></TABLE>