View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Clear a range of data

You could always do this...

Sub ClearData()
Range("AQ1:DU1").ClearContents
End Sub

--
Rick (MVP - Excel)


"Patrick C. Simonds" wrote in message
...
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