Macros

T

Terry

Hello there,

How do I create a macro to clear values in certain cells only, in one
worksheet?

Many Thanks
 
N

Norman Jones

Hi Terry,

By way of example, to clearvalues in the ranges A1:D10 and A20:B25, try:

Sub TestA()
Dim Rng As Range

Set Rng = Union(Range("A1:D10"), Range("A20:B25"))
Rng.ClearContents

End Sub
 
D

Don Guillett

try
sheets("sheet1").range("a1,b4,c5").clearcontents
Hope you get a good grade
 
Top