I am trying to get a piece of code to clear the data in some cells, using the column references. I am using the following code:
Worksheets(sheetname).Range(.
You need a With statement prior to this. Or make the .Cells into Cells