Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-07-2016, 10:34 PM
otuatail otuatail is offline Conditional formatting Windows 7 64bit Conditional formatting Office 2007
Competent Performer
Conditional formatting
 
Join Date: Jun 2012
Posts: 246
otuatail is on a distinguished road
Default Conditional formatting

Office 2007 Excel

I don't want to show a cell if it is a value divide by zero or negative.

I still get divide by zero error. This seems to over rule the condition.
Reply With Quote
  #2  
Old 07-08-2016, 12:45 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Conditional formatting Windows 7 64bit Conditional formatting Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,771
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

What do you mean by " show a cell"?

Conditionally format as background if DIV0 error or negative?

Then this should work as conditional format
=OR(TYPE(A1)=16,A1<0)

Format as reuired
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #3  
Old 07-09-2016, 02:59 AM
otuatail otuatail is offline Conditional formatting Windows 7 64bit Conditional formatting Office 2007
Competent Performer
Conditional formatting
 
Join Date: Jun 2012
Posts: 246
otuatail is on a distinguished road
Default

What I wanted was to change the font colour to white so you never saw any text. Preferably dont't put anything in the cell.

I made a condition if less than one font colour white. This still is in black stating #Div /0! in Blue bold text.
Reply With Quote
  #4  
Old 07-09-2016, 03:41 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Conditional formatting Windows 7 64bit Conditional formatting Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,771
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Please post a small sample sheet showing what you have and desired results Thx
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #5  
Old 07-10-2016, 02:27 AM
otuatail otuatail is offline Conditional formatting Windows 7 64bit Conditional formatting Office 2007
Competent Performer
Conditional formatting
 
Join Date: Jun 2012
Posts: 246
otuatail is on a distinguished road
Default

Here is a sample G3 shows divide by zero error.
Attached Files
File Type: xlsx Sample.xlsx (21.4 KB, 9 views)
Reply With Quote
  #6  
Old 07-10-2016, 07:46 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Conditional formatting Windows 7 64bit Conditional formatting Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,771
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

As the cell value equates to an error, your condition that the cell value be smaller than 1 is not valid

Why?

When comparing, XL first compares the TYPE value of the data ( see that function for more information)


This function returns 16 for an error value and 1 for a number.
As 16 is not smaller than 1, your condition returns FALSE, the CF is thus not applied.

Instead go to Cond Formatting - New rule - select "use a formula" and enter =or(type($g3)=16,$G3<0)
and format as necessary after selecting a column range starting in G3
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #7  
Old 07-11-2016, 12:35 AM
otuatail otuatail is offline Conditional formatting Windows 7 64bit Conditional formatting Office 2007
Competent Performer
Conditional formatting
 
Join Date: Jun 2012
Posts: 246
otuatail is on a distinguished road
Default

That is not exactly correct. Look at it today. If you change the value in cell D3 so that the divide by zero moves to F3 then...

G3 will not be a divide by zero as it is a divide by -1 now.

-1 is less than one isn't it.
Reply With Quote
  #8  
Old 07-11-2016, 01:06 AM
otuatail otuatail is offline Conditional formatting Windows 7 64bit Conditional formatting Office 2007
Competent Performer
Conditional formatting
 
Join Date: Jun 2012
Posts: 246
otuatail is on a distinguished road
Default

I have posted a sheet that shows the problem fully

Here if Error display in orange
If less than 1 display in orange

=or(type(G$3)<>16,G$3>1)

Row 3 should fail the conditions as divisor is greater than 1. Should be blue.
Reply With Quote
  #9  
Old 07-11-2016, 01:12 AM
otuatail otuatail is offline Conditional formatting Windows 7 64bit Conditional formatting Office 2007
Competent Performer
Conditional formatting
 
Join Date: Jun 2012
Posts: 246
otuatail is on a distinguished road
Default

Sorry uploaded sheet.
Reply With Quote
  #10  
Old 07-11-2016, 01:29 AM
Kevin@Radstock Kevin@Radstock is offline Conditional formatting Windows 10 Conditional formatting Office 2016
Office 365
 
Join Date: Feb 2012
Posts: 94
Kevin@Radstock is on a distinguished road
Default

Hi

How about in G3:

=IFERROR(SUM((A3+$K$2)/(B3-2)),"")
or
=IF(ISERROR(SUM((A3+$K$2)/(B3-2))),"",SUM((A3+$K$2)/(B3-2)))
Reply With Quote
  #11  
Old 07-11-2016, 02:21 AM
otuatail otuatail is offline Conditional formatting Windows 7 64bit Conditional formatting Office 2007
Competent Performer
Conditional formatting
 
Join Date: Jun 2012
Posts: 246
otuatail is on a distinguished road
Default

Thanks Kevin these work when combined with conditional formatting less than 1.

Don't fully understand the if error function and I don't understand the difference between the 2 examples you show. The second has additional stuff.

I had to edit the formula with the '$'

=IF(ISERROR(SUM(($A3+$K$2)/($B3-2))),"",SUM(($A3+$K$2)/($B3-2)))

Need to get a book on this especially the use of macros. Have used them in Word
Reply With Quote
  #12  
Old 07-11-2016, 11:30 PM
Kevin@Radstock Kevin@Radstock is offline Conditional formatting Windows 10 Conditional formatting Office 2016
Office 365
 
Join Date: Feb 2012
Posts: 94
Kevin@Radstock is on a distinguished road
Default

Hi otuatail

Some people put their version of excel in their profile and on some occasions it is incorrect. The first example should do you the second is for versions older than Excel 2007.

Kevin
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional formatting Conditional formatting dayperson Excel 1 02-23-2016 09:07 AM
Conditional formatting Conditional formatting marif300 Project 9 09-23-2014 07:23 AM
Conditional formatting Conditional formatting that ignores other formatting rules info_guy2 Excel 1 07-03-2014 10:07 AM
Conditional formatting Conditional Formatting. Laurie B. Excel 6 04-09-2012 05:01 PM
Conditional formatting zanat0s Excel 4 01-20-2012 03:30 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:07 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft