#1   Report Post  
Dave Peterson
 
Posts: n/a
Default

How about:

Range("C2:L2,N2,O2:R2,T2:W2").ClearContents

No need to select first.

nowfal wrote:

HI,
I would like to know to selected multiple ranges and clear the
contents
presently my code is like this:

Range("C2:L2").Select
Selection.ClearContents
Range("N2").Select
Selection.ClearContents
ActiveWindow.SmallScroll ToRight:=6
Range("O2:R2").Select
Selection.ClearContents
Range("T2:W2").Select
Selection.ClearContents

I wanted to writed in one line like:

Range("C2:L2","N2","O2:R2","T2:W2").Select
Selection.ClearContents

Any possibility.
thanks in advance
regards
nowfal

--
nowfal
------------------------------------------------------------------------
nowfal's Profile: http://www.excelforum.com/member.php...o&userid=10003
View this thread: http://www.excelforum.com/showthread...hreadid=392092


--

Dave Peterson
Reply
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
Dynamic named range across multiple sheets babycody Excel Discussion (Misc queries) 3 July 24th 05 06:03 AM
sum multiple criteria where final range is text? jt76 Excel Discussion (Misc queries) 0 May 25th 05 04:48 PM
Product Function in Pivot Tables from Multiple Consolidation Range bbishop222 Excel Worksheet Functions 0 February 22nd 05 04:55 PM
SUMIF multiple criteria in 1 range Mike@Q Excel Worksheet Functions 5 November 26th 04 03:55 PM
Sum a range across multiple sheets CarlosAntenna Excel Worksheet Functions 4 October 29th 04 12:22 PM


All times are GMT +1. The time now is 08:59 AM.

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

About Us

"It's about Microsoft Excel"