Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Is there a way to switch data between two cells?
I just want to be able to select two cells and have the data switch between
them without having to Cut, Copy or Paste. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Is there a way to switch data between two cells?
Enter this macro:
Sub swap_it() Dim r, r1, r2 As Range If Selection.Count = 2 Then i = 1 For Each r In Selection If i = 1 Then Set r1 = r Else Set r2 = r End If i = 2 Next v1 = r1.Value v2 = r2.Value t = v1 r1.Value = v2 r2.Value = t End If End Sub Then select two cells and run the macro -- Gary''s Student "lhassell" wrote: I just want to be able to select two cells and have the data switch between them without having to Cut, Copy or Paste. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Setting hover data labels to cells other than source data | Charts and Charting in Excel | |||
Setting hover data labels to cells other than source data | Excel Discussion (Misc queries) | |||
From several workbooks onto one excel worksheet | Excel Discussion (Misc queries) | |||
Help PLEASE! Not sure what answer is: Match? Index? Other? | Excel Worksheet Functions | |||
How do I copy data (word) into respective cells when the data bei. | New Users to Excel |