Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Leave last col alone

Greg Wilson wrote

Range(Cells(c.Row, 1), Cells(c.Row, 255)).ClearContents


Actually, this syntax allowed me to successfully handle another workbook
where I had to clear multiple ranges in the same row:

cols = ActiveSheet.UsedRange.Columns.Count
Set rng = Range(Cells(5, 1), Cells(Rows.Count, 1).End(xlUp).Offset(-6, 0))
For Each c In rng
If c = Old_Member Then
Range(Cells(c.Row, 1), Cells(c.Row, 2)).ClearContents
Range(Cells(c.Row, 10), Cells(c.Row, cols)).ClearContents
End If
Next c

Many thanks!

--
David
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
Annual leave [email protected] Excel Discussion (Misc queries) 3 March 12th 08 02:20 PM
Leave Log CiceroCF Excel Discussion (Misc queries) 1 January 10th 07 07:25 PM
Annual Leave Aussie Peter Excel Discussion (Misc queries) 1 January 31st 06 03:25 AM
Time To Leave Nicholas Scarpinato Excel Discussion (Misc queries) 3 June 20th 05 10:18 PM
Leave last col alone Bob Phillips[_5_] Excel Programming 0 September 1st 03 02:38 PM


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