Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default hide the #DIV/0!

Allen helped me with this code

=IF(A2/A1<20%,"black",IF(A2/A1<40%,"pink",IF(A2/A1<60%,"orange",...)))

But if I do not have a value in cell A1 or A2 I get #DIV/0!

How can I hide this?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default hide the #DIV/0!

=IF(OR(A1="",A2="","",IF(A2/A1<20%,"Black"....... and so on

--
kassie

never stop learning




"KAnoe" wrote in message
...
Allen helped me with this code

=IF(A2/A1<20%,"black",IF(A2/A1<40%,"pink",IF(A2/A1<60%,"orange",...)))

But if I do not have a value in cell A1 or A2 I get #DIV/0!

How can I hide this?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default hide the #DIV/0!

Just add this to the beginning of your formula.

IF(A1="","",


HTH,
Paul

"KAnoe" wrote in message
...
Allen helped me with this code

=IF(A2/A1<20%,"black",IF(A2/A1<40%,"pink",IF(A2/A1<60%,"orange",...)))

But if I do not have a value in cell A1 or A2 I get #DIV/0!

How can I hide this?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default hide the #DIV/0!

Oops, left out the closing bracket. Change that to =IF(OR(A1="",A2=""),"",
and then the rest of your formula.

--
kassie

never stop learning




"Kassie" <kassie_kasselman@hotmaildotcomFIXDOT wrote in message
...
=IF(OR(A1="",A2="","",IF(A2/A1<20%,"Black"....... and so on

--
kassie

never stop learning




"KAnoe" wrote in message
...
Allen helped me with this code

=IF(A2/A1<20%,"black",IF(A2/A1<40%,"pink",IF(A2/A1<60%,"orange",...)))

But if I do not have a value in cell A1 or A2 I get #DIV/0!

How can I hide this?






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default hide the #DIV/0!

See answer in original thread

--
Regards,
Tom Ogilvy


"KAnoe" wrote:

Allen helped me with this code

=IF(A2/A1<20%,"black",IF(A2/A1<40%,"pink",IF(A2/A1<60%,"orange",...)))

But if I do not have a value in cell A1 or A2 I get #DIV/0!

How can I hide this?




  #6   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default hide the #DIV/0!

I would add one thing to Kassie's reply. You also get the Div/0! error when
the denominator is zero. So...
=if(or(a1="",a2="",a2=0)...
Assuming a2 is the denominator.
--
JNW


"Kassie" wrote:

Oops, left out the closing bracket. Change that to =IF(OR(A1="",A2=""),"",
and then the rest of your formula.

--
kassie

never stop learning




"Kassie" <kassie_kasselman@hotmaildotcomFIXDOT wrote in message
...
=IF(OR(A1="",A2="","",IF(A2/A1<20%,"Black"....... and so on

--
kassie

never stop learning




"KAnoe" wrote in message
...
Allen helped me with this code

=IF(A2/A1<20%,"black",IF(A2/A1<40%,"pink",IF(A2/A1<60%,"orange",...)))

But if I do not have a value in cell A1 or A2 I get #DIV/0!

How can I hide this?







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
How do you hide/un-hide the grid lines ED Excel Discussion (Misc queries) 4 February 26th 13 03:22 PM
Want to Hide columns in spreadsheet but NOT hide data in chart. KrispyData Charts and Charting in Excel 1 March 20th 09 04:45 PM
How do I hide hide #REF! in Excel PerryK Excel Discussion (Misc queries) 3 February 27th 09 02:59 PM
Hide And Un-hide Excel Toolbars Jim333[_4_] Excel Programming 3 July 2nd 05 08:00 PM
How do I hide a worksheet in Excel and use a password to un-hide . Dchung Excel Discussion (Misc queries) 3 December 2nd 04 06:24 AM


All times are GMT +1. The time now is 03:46 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"