#1   Report Post  
Posted to microsoft.public.excel.misc
Bryan
 
Posts: n/a
Default IF Formula

Hi,

By using the formula below i am trying to stop the cell in my spreadsheet
displaying #DIV/0! message. could someone offer me a suggestion to tweak it
so that it doesn't as i am stuck!

=IF(F4/H4*1000,F4/H4*100,"")

Many thanks,
Bryan
  #2   Report Post  
Posted to microsoft.public.excel.misc
Miguel Zapico
 
Posts: n/a
Default IF Formula

You may try with:
=IF(H4<0,F4/H4*100,"")

Miguel.

"Bryan" wrote:

Hi,

By using the formula below i am trying to stop the cell in my spreadsheet
displaying #DIV/0! message. could someone offer me a suggestion to tweak it
so that it doesn't as i am stuck!

=IF(F4/H4*1000,F4/H4*100,"")

Many thanks,
Bryan

  #3   Report Post  
Posted to microsoft.public.excel.misc
bpeltzer
 
Posts: n/a
Default IF Formula

You've got to detect and prevent the division by 0:
=if(h4=0,"",f4/h4*100)

"Bryan" wrote:

Hi,

By using the formula below i am trying to stop the cell in my spreadsheet
displaying #DIV/0! message. could someone offer me a suggestion to tweak it
so that it doesn't as i am stuck!

=IF(F4/H4*1000,F4/H4*100,"")

Many thanks,
Bryan

  #4   Report Post  
Posted to microsoft.public.excel.misc
Mark Lincoln
 
Posts: n/a
Default IF Formula

Try this:

=IF(H4<0,IF(F4/H4*1000,F4/H4*100,""),"")

  #5   Report Post  
Posted to microsoft.public.excel.misc
Bryan
 
Posts: n/a
Default IF Formula

Thanks Everyone thats great all of the formulas worked well.

regards,
Bryan

"Mark Lincoln" wrote:

Try this:

=IF(H4<0,IF(F4/H4*1000,F4/H4*100,""),"")




  #6   Report Post  
Posted to microsoft.public.excel.misc
Dana DeLouis
 
Posts: n/a
Default IF Formula

F4/H4*1000

As a very small side note...you could reduce this to: F4/H4 0 if you wish.
--
HTH. :)
Dana DeLouis

"Bryan" wrote in message
...
Thanks Everyone thats great all of the formulas worked well.

regards,
Bryan

"Mark Lincoln" wrote:

Try this:

=IF(H4<0,IF(F4/H4*1000,F4/H4*100,""),"")




  #7   Report Post  
Posted to microsoft.public.excel.misc
Abode
 
Posts: n/a
Default IF Formula

The Problem with your formula is that you used a calculation that divides by
zero in order to find out if it devides by zero. When you run into an error
a small box with an exclimation mark appears. If you click on that and press
Show calculation steps you can see what the computer is doing each step.
Your calculation looks like this (I used 1 as F4 and 0 As H4)

=IF(1/0*1000,1/0*100,"")
=IF(#DIV/0*1000,1/0*100,"")
=IF(#DIV/00,1/0*100,"")
#DIV/0

The division by zero occured before it could find out if it would happen or
not. So the Error ate right through the formula. Miguels formula (
=IF(H4=0,F4/H4*100,"") ) Works well because it sees if H4 is a zero before it
does any division. Hopefully this explination will help you when you run
into similar Errors in the future.

"Bryan" wrote:

Thanks Everyone thats great all of the formulas worked well.

regards,
Bryan

"Mark Lincoln" wrote:

Try this:

=IF(H4<0,IF(F4/H4*1000,F4/H4*100,""),"")


  #8   Report Post  
Posted to microsoft.public.excel.misc
Abode
 
Posts: n/a
Default IF Formula

Pardon. When I wrote =IF(H4=0,F4/H4*100,"") it was ment to be
=IF(H4<0,F4/H4*100,"")

"Abode" wrote:

The Problem with your formula is that you used a calculation that divides by
zero in order to find out if it devides by zero. When you run into an error
a small box with an exclimation mark appears. If you click on that and press
Show calculation steps you can see what the computer is doing each step.
Your calculation looks like this (I used 1 as F4 and 0 As H4)

=IF(1/0*1000,1/0*100,"")
=IF(#DIV/0*1000,1/0*100,"")
=IF(#DIV/00,1/0*100,"")
#DIV/0

The division by zero occured before it could find out if it would happen or
not. So the Error ate right through the formula. Miguels formula (
=IF(H4=0,F4/H4*100,"") ) Works well because it sees if H4 is a zero before it
does any division. Hopefully this explination will help you when you run
into similar Errors in the future.

"Bryan" wrote:

Thanks Everyone thats great all of the formulas worked well.

regards,
Bryan

"Mark Lincoln" wrote:

Try this:

=IF(H4<0,IF(F4/H4*1000,F4/H4*100,""),"")


  #9   Report Post  
Posted to microsoft.public.excel.misc
Tim M
 
Posts: n/a
Default IF Formula

Try something like this

=IF(ISERR(F4/H4),"",F4/H4)

This should check to see if the division produces an error (Div by 0
included) and it so it will put a blank, other wise it will do the
calculation.


"Bryan" wrote:

Hi,

By using the formula below i am trying to stop the cell in my spreadsheet
displaying #DIV/0! message. could someone offer me a suggestion to tweak it
so that it doesn't as i am stuck!

=IF(F4/H4*1000,F4/H4*100,"")

Many thanks,
Bryan

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
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
2 Nesting questions Starchaser Excel Worksheet Functions 7 January 20th 06 06:53 PM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM


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