Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 150
Default Select #VALUE cells

How to highlight the cells containing #values and #N/A.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Select #VALUE cells

If you're looking for all errors...

Select the range you want to inspect
Edit|goto|Special
check formulas (or constants???)
Only leave the Errors option checked
click ok

Change the fill color of those cells????

If you need a macro, you can record one when you do it manually.

stan wrote:

How to highlight the cells containing #values and #N/A.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 150
Default Select #VALUE cells

Thank's Dave Peterson

The recorded code for formula is
Selection.SpecialCells(xlCellTypeFormulas, 16).Select

"Dave Peterson" wrote:

If you're looking for all errors...

Select the range you want to inspect
Edit|goto|Special
check formulas (or constants???)
Only leave the Errors option checked
click ok

Change the fill color of those cells????

If you need a macro, you can record one when you do it manually.

stan wrote:

How to highlight the cells containing #values and #N/A.


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Select #VALUE cells

You can use some of excel's constants to make the code a little less cryptic:

Selection.SpecialCells(xlCellTypeFormulas, xlErrors).Select

And there are actually some problems when the selection is a single cell. The
..specialcells stuff will look at the entire sheet.

Your code could be a little more robust:

Option Explicit
Sub testme01()
Dim myRng As Range
Set myRng = Nothing
On Error Resume Next 'in case there are no errors
Set myRng = Intersect(Selection, _
Selection.SpecialCells(xlCellTypeFormulas, xlErrors))
On Error GoTo 0

If myRng Is Nothing Then
MsgBox "No Errors in Selection"
Else
myRng.Select
End If
End Sub


stan wrote:

Thank's Dave Peterson

The recorded code for formula is


"Dave Peterson" wrote:

If you're looking for all errors...

Select the range you want to inspect
Edit|goto|Special
check formulas (or constants???)
Only leave the Errors option checked
click ok

Change the fill color of those cells????

If you need a macro, you can record one when you do it manually.

stan wrote:

How to highlight the cells containing #values and #N/A.


--

Dave Peterson


--

Dave Peterson
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
Up down arrow keys do not select cells if select locked cells unch roandrob Excel Discussion (Misc queries) 3 May 18th 09 12:48 AM
Macro to select cells without a certain value and select a menu it Guy[_2_] Excel Worksheet Functions 9 January 2nd 09 05:21 PM
Using formulas to select cells (Ex: Select every nth cell in a col Lakeview Photographic Services Excel Discussion (Misc queries) 2 March 15th 07 02:17 PM
macro to select cells containing specific text and delete all cells but these JenIT Excel Programming 3 March 27th 06 10:07 PM
how do you "select locked cells" w/o "select unlocked cells"? princejohnpaulfin Excel Discussion (Misc queries) 3 July 16th 05 03:53 AM


All times are GMT +1. The time now is 01:12 AM.

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

About Us

"It's about Microsoft Excel"