Search : in
By :

EXCEL: Deleting cell range (multiple sheets)

Last answer on Aug 21, 2009 2:03:13 am BST Moltenmagma, on Aug 20, 2009 5:06:50 pm BST 
 Report this message to moderators

Hi,

I have been trying to figure out how to clear the contents of specified cell, say

Range (A12:U12).Select
ActiveCell.End(xlDown).Select
Selection.ClearContents

from n number of worksheets in 1 workbook.

I have tried using For loop but it only clears the selected sheet.

Is there a quicker solution to resolve this?

Thank you very much.

Configuration: Windows XP Internet Explorer 7.0

Best answers for « EXCEL: Deleting cell range (multiple sheets) » in :
[VBA] Deleting a word in a range of cell Show [VBA] Deleting a word in a range of cell In the case you want to delete a word in a sentence, just create a small macro that removes the word. But it will become difficult when you have word like, for example, "Theword" or "THEWORD" or...
Excel – Comparing cell A1 to entire A column in Sheet 2 ShowExcel – Comparing cell A1 to entire A column in Sheet 2 Issue Solution Note Issue I have been trying to compare sheet1 A2 to sheet2 A2 through A500 and if it exists somewhere in sheet2's a col then copy that entire row to a new sheet....
[Excel]changing cell formula to text Show[Excel]changing cell formula to text Issue Solution Notes Issue Consider that I have: In cell A4, it contains a formula =Sum(A1:B3)+A3/B2. How to extract this formula in cell A6 as a string of text? That is ... I want cell A6...
Repainting a cell using excel VBA ShowRepainting a cell using excel VBA Issue Solution Note Issue I am writing a code in excel VBA to generate a report.I am totally new to VBA.Here's my code Private Sub CommandButton1_Click() Dim a1 As Integer Dim d1 As Integer Dim...
Spreadsheets - Cell Selection ShowCell Selection Spreadsheets are powerful tools for working with data. However, to work with data, it is necessary to have tools to rapidly choose the required cells. Line Selection An entire line can be chosen by clicking directly on the line...

1

 venkat1926, on Aug 21, 2009 2:03:13 am BST

Try this macro

Sub test()
Dim j As Integer, k As Integer
j = Sheets.Count

For k = 1 To j
With Sheets(k)
.Range("a1:F1").Clear
End With
Next k
End Sub


I have chosen range("a1:F!").modify this line to suit you
"clearcontents" will clear contents only but not the formulas and formats
i

Reply to venkat1926