Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default delete error/blank cells

Happy Friday!

My question is: if a worksheet contains both numerical and error cells, how
can I delete all error cells (not just delete the error contents)
simultanuously?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 209
Default delete error/blank cells

vba code:
Cells.SpecialCells(xlCellTypeFormulas, xlErrors).Delete

--
Hope this helps.
If this post was helpfull, please remember to click on the ''''YES''''
button at the bottom of the screen.
Thanks,
Gary Brown


"Ask MS" wrote:

Happy Friday!

My question is: if a worksheet contains both numerical and error cells, how
can I delete all error cells (not just delete the error contents)
simultanuously?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default delete error/blank cells

Hi, Gary

Thanks for your quick reply. This is my first time hearing of VBA. Do you
mind give me a brief introduction and how exactly I can get to the
"Cells.SpecialCells(xlCellTypeFormulas, xlErrors).Delete" path in Excel?

Thanks a lot



"Gary Brown" wrote:

vba code:
Cells.SpecialCells(xlCellTypeFormulas, xlErrors).Delete

--
Hope this helps.
If this post was helpfull, please remember to click on the ''''YES''''
button at the bottom of the screen.
Thanks,
Gary Brown


"Ask MS" wrote:

Happy Friday!

My question is: if a worksheet contains both numerical and error cells, how
can I delete all error cells (not just delete the error contents)
simultanuously?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 209
Default delete error/blank cells

1) Open the workbook that you want to work on
2) Go to the worksheet that you want to work on
3) From the top menu, select ToolsMacrosVisual Basic Editor
4) In the left side, you will see a window with the title of 'Project -
VBAProject'
5) In that window, you will see your Excel file name
6) The sheet that you want to work on will probably be highlighted.
7) From the top menu, select InsertModule
8) The window on the left should now show 'Module1'
9) A blank window should have appeared in the right window
10) in the new blank window on the right, create a procedure called
"DeleteStuff" by typing the following...

Public Sub DeleteStuff()
Cells.SpecialCells(xlCellTypeFormulas, xlErrors).Delete
End Sub

11) Get back into Excel by selecting from the top menu FileClose and
Return to Microsoft Excel
12) SAVE YOUR WORKBOOK!!!!!!!!!!! because we are about to run the macro
13) From the top menu, select ToolsMacroMacros
14) Select the macro 'DeleteStuff
15) Select 'Run'

If there are no cells that need to be deleted, you will get an error, but
that's ok.

--
Hope this helps.
If this post was helpfull, please remember to click on the ''''YES''''
button at the bottom of the screen.
Thanks,
Gary Brown


"Ask MS" wrote:

Hi, Gary

Thanks for your quick reply. This is my first time hearing of VBA. Do you
mind give me a brief introduction and how exactly I can get to the
"Cells.SpecialCells(xlCellTypeFormulas, xlErrors).Delete" path in Excel?

Thanks a lot



"Gary Brown" wrote:

vba code:
Cells.SpecialCells(xlCellTypeFormulas, xlErrors).Delete

--
Hope this helps.
If this post was helpfull, please remember to click on the ''''YES''''
button at the bottom of the screen.
Thanks,
Gary Brown


"Ask MS" wrote:

Happy Friday!

My question is: if a worksheet contains both numerical and error cells, how
can I delete all error cells (not just delete the error contents)
simultanuously?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using a function to delete blank cells Carter Devereaux Excel Worksheet Functions 2 September 1st 07 03:40 PM
Easiest way to delete blank cells in column (not entire row) sramsey Excel Discussion (Misc queries) 4 February 16th 06 04:28 PM
Macro to Delete blank cells GarToms Excel Worksheet Functions 1 January 26th 06 07:39 PM
delete coumns - shift non-blank cells message omb researcher Excel Discussion (Misc queries) 2 September 26th 05 11:07 PM
Formula to delete blank cells across multiple columns? SamFunMail Excel Worksheet Functions 2 September 1st 05 07:05 AM


All times are GMT +1. The time now is 01:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"