LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Change the interior color of a cell - Code Review

On Sat, 17 Dec 2005 08:27:13 -0700, JE McGimpsey
wrote:

No, the presence of Text is not causing your error. Application.Max and
.Min ignore text.

They will not ignore errors, so if you have errors, you should
trap/eliminate them.

What error is appearing "on the IIF line"?


In article ,
Hexman wrote:

Ah! Much more concise code. In trying the 1st one, an error appears
on the IIF line. The range does contain some non-numeric cells, so I
believe an individual cell test has to be made. I'm assuming the IIF
statement assumes all the cells in the range contains numerics. How
do you get around that if some cells are alpha?

I do like the compactness of your code and would rather use it than my
own.



Run-time error '13':

Type mismatch.


You're right! In the cell is an error showing "#DIV/0!", which is an
error from one of his previous calculations on another sheet.

When I remove (zero out) the division errors everything works fine.

I know the real solution is to revise the original calculation to
eliminate the error.

Thanks for pointing this out. Again, excellent job of condensing and
streamlining the code.

Hexman


 
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
change default font color for editing/review AJB Excel Discussion (Misc queries) 6 July 27th 07 09:00 PM
Cell interior color JohnB Excel Discussion (Misc queries) 4 October 12th 06 06:07 PM
Code to change interior colour only if current interior colour is BeSmart Excel Programming 2 October 5th 04 12:06 AM
Interior Cell color Pellechi Excel Programming 1 September 23rd 03 03:39 PM


All times are GMT +1. The time now is 09:53 PM.

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"