View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Michael Arch Michael Arch is offline
external usenet poster
 
Posts: 32
Default Clear a range of data

Is this what you need?
set rng = Range(Cells(1,43),Cells(1,125))
rng.clearcontents
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Patrick C. Simonds" wrote:

I know I can use the code below to clear data from a range, but I need to
clear data from rng(1, 43) through rng(1, 125). Is there any way to do that
without having to write a line for each rng to be cleared?

Sub ClearData()

Dim rng
Set rng = Cells(ActiveCell.Row, 1)

rng(1, 43).Value = ""

End Sub