[Solved] Swap two columns

Discuss the spreadsheet application
Locked
Alduin's Khajiit
Posts: 46
Joined: Mon May 13, 2013 3:51 pm

[Solved] Swap two columns

Post by Alduin's Khajiit »

How do I swap column a and b in calc? used Excel until Windows 7 when Office 2003 was no longer compatible, in Excel, all you needed to do was click and drag, Calc just wants to highlight the two columns when I do that. is it possible to swap those two columns in Calc?
Last edited by Hagar Delest on Tue May 14, 2013 4:07 pm, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 4.1.1 on Windows 7, OpenOffice 2.4.3 on Windows 98
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Swap two columns

Post by acknak »

It's a little more complicated in Calc:

Select column B

Click anywhere in the highlighted area and drag the column. The mouse pointer should change to show the drag operation.

Before you release the mouse button, also press the Alt key. When the mouse pointer is at the left side of column A, release the mouse button.

Column B should be moved to the left of column A so that A and B are switched.
AOO4/LO5 • Linux • Fedora 23
User avatar
MrProgrammer
Moderator
Posts: 4882
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Swap two columns

Post by MrProgrammer »

Hi, and welcome to the forum.

I see that the OP uses Windows, but for the benefit of Mac users reading this post, while the preceeding procedure may work on other platforms, it will not work on a Mac because the corresponding Option+Drag operation always inserts the dragged data; it doesn't move it. There is no Mac method to drag the data and have it inserted to the left of column A while deleting column B.

For any platform, including Mac:
  • Click the "B" above row 1; Edit > Cut.
  • Click the "A" above row 1; Click anywhere in the highlighted area and drag it to column B.
  • Click the "A" above row 1; Edit > Paste.
If this answered your question please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Alduin's Khajiit
Posts: 46
Joined: Mon May 13, 2013 3:51 pm

Re: Swap two columns

Post by Alduin's Khajiit »

I was able to move it but everything in column a is now kaput gone! and column b is now a blank column
OpenOffice 4.1.1 on Windows 7, OpenOffice 2.4.3 on Windows 98
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Swap two columns

Post by acknak »

Alduin's Khajiit wrote:I was able to move it but everything in column a is now kaput gone! and column b is now a blank column
It sounds like you did not use the Alt key as required to move the column, as opposed to moving the contents.

When you drag column B, before you release the mouse button to drop the column, press and hold the Alt key.

If you can't get it to work, use the cut/paste steps MrProgrammer has given.
AOO4/LO5 • Linux • Fedora 23
Alduin's Khajiit
Posts: 46
Joined: Mon May 13, 2013 3:51 pm

Re: Swap two columns

Post by Alduin's Khajiit »

that fixed it! thanks
OpenOffice 4.1.1 on Windows 7, OpenOffice 2.4.3 on Windows 98
david7365
Posts: 32
Joined: Thu Mar 22, 2012 8:59 pm

Re: [Solved] Swap two columns

Post by david7365 »

MrProgrammer's solution worked for me. acknak's solution did not work--I tried three times. OO 4.1.2 calc; Windows 8.1 .
Locked