This should work, Wyatt:
Sub ThisIsUntested()
'assuming the tables are in rows 2,42, 86, 100:
for j=2 to 100
Select Case j
Case 2,42,86,100
For i=j+1 to j+9 step 2
cells(i,3).resize(1,12).ClearContents
Next
End Select
Next
End Sub
Check out my book on tips & tricks at http://www.iil.com/
iil/excelmagic
Check out the Excel User Conference:
http://
www.exceluserconference.com/ECEUC.html
Bob Umlas, Excel MVP
----- Original Message ----
From: "Lemmons, Wyatt" <wyatt.lemmons BOEING.COM>
To: EXCEL-L PEACH.EASE.LSOFT.COM
Sent: Wednesday, March 28, 2007 3:51:40 PM
Subject: Clearing Contents of sporatic cells across a
worksheet
What would be a good way to via vb code to clear the
contents of cells
on a work sheet as follows;
Got a table in the range C2:N11. Even Rows are headings
& odd rows are
the cells I wanna clear.
THEN ...
And I want to trigger this clearing due to a change in a
specific cell
via validation input from a pick list ( this case it's Q8 )
AND ...
I need it to be portable to 9 other tables down the sheet
versus hard
coding it like below. ( all tables are of the same layout
)
Any Suggestions ? TIA
I recorded this:
Sub Macro2()
Range("C3:N3,C5:N5,C7:N7,C9:N9,C11:N11").Select
Range("C11").Activate
Selection.ClearContents
Range("Q8").Select
End Sub
thank you,
Wyatt Lemmons, HSG
(425) 830-5962 4x10 Wrk Sch ( Fri OFF ) & Telecommute:
Wed
____________________________________________________________
________________________
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newm
ail_tools.html
------------------------------------------------------------
--------------
The EXCEL-G list is hosted on a Windows NT(TM) machine
running L-Soft
international's LISTSERV(R) software. For
subscription/signoff info
and archives, see htt
p://peach.ease.lsoft.com/archives/excel-g.html .
COPYRIGHT INFO:
http://peach.ease.lsoft.com/scripts/wa
.exe?SHOWTPL=COPYRIGHT&L=EXCEL-G
|