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: 118
Default Copy format from row above for selected cells

Sub FormatasRowAbove()
Dim rng As Range
Set rng = ActiveCell
Rows(rng.Row - 1).Copy
Cells(rng.Row, 1).PasteSpecial Paste:=xlPasteFormats
Application.CutCopyMode = False
rng.Select
End Sub

How can I make above macro work for an area of cells

i.e

By selecting A2:A7 - I would like row 2 & row 7 to have same format as
row 1

Thxs

 
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
Cannot copy selected cells Stevie Excel Discussion (Misc queries) 1 February 19th 10 06:06 PM
auto copy only selected cells Keith Crooks Excel Worksheet Functions 1 February 25th 06 09:42 PM
Copy Selected cells down a row with macro DB33 Excel Discussion (Misc queries) 1 February 15th 06 05:33 PM
copy selected cells to new workbook? Chimanrao Excel Programming 6 October 23rd 05 06:33 PM
Macro to format selected cells BeSmart[_2_] Excel Programming 4 May 7th 04 01:28 PM


All times are GMT +1. The time now is 01:39 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"