Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro Help
I am making a macro that deletes #N/A's, but i want to add a few things to it
that should be deleted: the phrases "total board" and "total metal", and any non-text (i.e. any number) that appears. this is what i have so far: Public Sub DeleteStuff() Cells.SpecialCells(xlCellTypeFormulas, xlErrors).Delete End Sub what do i add to meet my specifications? thanks. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro Help
Try this
Public Sub DeleteStuff() dim cell as range Cells.SpecialCells(xlCellTypeFormulas, xlErrors).Deletefor each cell in cells if cell.value = "total board" _ or cell.value = "total metal" _ or isnumber(cell.value) = true then cell.clearcontents end if next cell End Sub "DFrank" wrote: I am making a macro that deletes #N/A's, but i want to add a few things to it that should be deleted: the phrases "total board" and "total metal", and any non-text (i.e. any number) that appears. this is what i have so far: Public Sub DeleteStuff() Cells.SpecialCells(xlCellTypeFormulas, xlErrors).Delete End Sub what do i add to meet my specifications? thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
need help to update macro to office 2007 macro enabled workbook | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions |