LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Creating a macro to swap cells but retain formatting

Greetings,

I have a macro that I am using to swap the contents of two cells. When I
use it I lose any character formatting that I have applied to the cell(s).
Does anyone have any insights into how to do a swap cell macro but retain
the formatting?

Sub SwitchCells()
'
' Macro created 4/13/2007 by willis

Range("k13") = Range("g13")
Range("g13") = Range("b13")
Range("b13") = Range("k13")
Range("k13") = ""
End Sub

Best regards!
Jeff


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I swap cells Josh W Excel Discussion (Misc queries) 6 March 10th 09 07:13 PM
swap values between two cells killdare Excel Worksheet Functions 3 November 26th 07 07:20 AM
retain cell formatting bob777 Excel Discussion (Misc queries) 1 November 2nd 05 05:02 PM
Swap contents of two cells Sterling Excel Discussion (Misc queries) 3 October 20th 05 06:04 PM
Swap Cells William Wolfe Excel Discussion (Misc queries) 4 June 16th 05 05:18 PM


All times are GMT +1. The time now is 11:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"