Re: Excel Cell Formats
- From: "Rick Rothstein" <rick.newsNO.SPAM@xxxxxxxxxxxxxxxxxx>
- Date: Sun, 28 Sep 2008 16:42:31 -0400
Select your two cells and give this macro a try...
Sub SwapCells()
Dim C1 As Range
Dim C2 As Range
Dim C3 As Range
If Selection.Count = 2 Then
Set C1 = Selection(1)
Set C2 = Range(Split(Replace(Selection.Address, ",", ":"), ":")(1))
Set C3 = Active***.Cells(Rows.Count, C1.Column).End(xlUp).Offset(1)
C1.Copy C3
C2.Copy C1
C3.Copy C2
C3.Clear
End If
End Sub
--
Rick (MVP - Excel)
"Bob" <someonw@xxxxxx> wrote in message news:%23bkNBFaIJHA.2208@xxxxxxxxxxxxxxxxxxxxxxx
Hi everyone:
I am trying to swap two cells completely, with each other, including value, All formats, colors, etc. Well, swapping the values is easy. Does anyone know, how I can swap All the formats (actual format, color, indent, etc) that a cell can hold? Thanks for your help.
Bob
.
- Follow-Ups:
- Re: Excel Cell Formats
- From: Bob
- Re: Excel Cell Formats
- References:
- Excel Cell Formats
- From: Bob
- Excel Cell Formats
- Prev by Date: Re: Invalid Web Query Error
- Next by Date: Re: Using an input box for multiple choices has display limits
- Previous by thread: Excel Cell Formats
- Next by thread: Re: Excel Cell Formats
- Index(es):