View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Josh W Josh W is offline
external usenet poster
 
Posts: 55
Default How can I swap cells

Sheelo, I used Shane's macro because that macro is a swap command for all two
cells selected, which is extremely useful. Your link to setting up macro's
was excellent. I did it the first time today. Thanks.

"Sheeloo" wrote:

Following macro will do the swap for you
Sub swap()
temp = Cells(5, 1)
Cells(5, 1) = Cells(9, 4)
Cells(9, 4) = temp
End Sub

See http://www.taltech.com/support/sw_tricks/exmacros.htm on details on how
to use a macro

"Josh W" wrote:

Thanks, but I knew that already. However, to swap the contents with cut and
paste is extremely tedious, especially as I have to do it quite often. I want
to know if there is any shortcut/button/macro? I just noticed some
discussions about this from a few years back. But I don't know anything about
macro's so I wouldn't know I to create the button myself. Greatly appreciate
any help..

"Sheeloo" wrote:

Not sure what you are looking for...

Cut (or copy) and paste A5 to an empty cell, cut (or copy) and paste D9 to
A5, cut (or copy) from the cell you coped A5 and paste to D9... Clear the
cell used.

"Josh W" wrote:

What is the quickest way to swap two different cells. Say I want to move the
contents of cell A5 to cell D9 and the contents of cell D9 back to A5 -
basically swapping the two. Thanks.