I am using the following formula:
=O260/(COUNTIF('CLOSED SALES ORDERS'!$A$2:$A$14765,'Input Sheet'!G260))
This works just fine if the value column O260 is on the Closed Sales Order Tab. If it does not exist, I get the following error:
#DIV/0!
Is there any way to replace the #DIV/0! with a zero or a blank?
I tried using ISERROR but it didn't seem to work. Maybe I'm not using it properly.
Can anyone help me?
Last edited by lmjones78; 09-11-2009 at 02:41 PM.
Hi,
Welcome to the forum, does this help?
=IF(O260="","",O260/(COUNTIF('CLOSED SALES ORDERS'!$A$2:$A$14765,'Input Sheet'!G260)))
oldchippy
-------------
![]()
![]()
If you are happy with the help you have received, please click the blue scales icon in the blue bar of the post.
Click here >>> Top Excel links for beginners to Experts
Forum Rules >>>Please don't forget to read these
Thank you so much for the reply.
I copied and pasted your formula but I still get the #DIV/0! error.
If you get #DIV/0! error that means you are trying to divide by zero, so that occurs when your COUNTIF returns zero. You can fix that like this
=IF(COUNTIF('CLOSED SALES ORDERS'!$A$2:$A$14765,'Input Sheet'!G260),O260/COUNTIF('CLOSED SALES ORDERS'!$A$2:$A$14765,'Input Sheet'!G260),"")
Or, since you're using Excel 2007,
=IFERROR(O260 / COUNTIF('CLOSED SALES ORDERS'!$A$2:$A$14765, 'Input Sheet'!G260), "")
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
Good thinking Steve........
You guys rule!!!
Thank you so much for your help. It works perfectly.![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks