How to make #DIV/0! Invisible?!

LaurenHancy

Board Regular
Joined
Aug 5, 2010
Messages
166
Hello,

I am using this formular to find the average for a certain products but it comes back with a DIV/0!. I still want the formular to be in the back ground as when i rerun the report it may come back with a figure.

This is the current formular i am using:

{=AVERAGE(IF($J$20:$J$201=B5,$AI$20:$AJ$201))}

Hope you can help.

Many thanks

Lauren
 

Some videos you may like

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Stu Dapples

Active Member
Joined
Jan 12, 2009
Messages
252
Try this:

{=IF(ISERROR(AVERAGE(IF($J$20:$J$201=B5,$AI$20:$AJ$201)),"",AVERAGE(IF($J$20:$J$201=B5,$AI$20:$AJ$201))}

Should do the trick but never used with the curly braces before...
 

LaurenHancy

Board Regular
Joined
Aug 5, 2010
Messages
166
Thanks for the fast reply. Unfortunately it doesn't work. It doesnt even bring a error message back, just:

{=IF(ISERROR(AVERAGE(IF($J$20:$J$201=B5,$AI$20:$AJ$201)),"",AVERAGE(IF($J$20:$J$201=B5,$AI$20:$AJ$201))}

Any other ideas?

Thanks

L :)
 

Stu Dapples

Active Member
Joined
Jan 12, 2009
Messages
252
Dont type in the curly brace {}, I'm not sure why you need to use them anyway but if you do, enter the formula then hold ctrl, shift and hit enter, excel will add the braces for you!

I think it is something to do with the way in which excel handles the formula, something about iterations :confused:

I think you formula will work without, give it a try....
 

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
You're missing a couple ))

try

=IF(ISERROR(AVERAGE(IF($J$20:$J$201=B5,$AI$20:$AJ$201))),"",AVERAGE(IF($J$20:$J$201=B5,$AI$20:$AJ$201)))

enterd with CTRL + SHIFT + ENTER
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,105,971
Messages
5,508,473
Members
408,688
Latest member
Bhojraj

This Week's Hot Topics

  • Turn fraction around
    Hello I need to turn a fraction around, for example I have 1/3 but I need to present as 3/1
  • TIme Clock record reformatting to ???
    Hello All, I'd like some help formatting this (Tbl-A)(Loaded via Power Query) [ATTACH type="full" width="511px" alt="PQdata.png"]22252[/ATTACH]...
  • TextBox Match
    hi, I am having a few issues with my code below, what I need it to do is when they enter a value in textbox8 (QTY) either 1,2 or 3 the 3 textboxes...
  • Using Large function based on Multiple Criteria
    Hello, I can't seem to get a Large formula to work based on two criteria's. I can easily get a oldest value based one value, but I'm struggling...
  • Can you check my code please
    Hi, Im going round in circles with a Compil Error End With Without With Here is the code [CODE=rich] Private Sub...
  • Combining 2 pivot tables into 1 chart
    Hello everyone, My question sounds simple but I do not know the answer. I have 2 pivot tables and 2 charts that go with this. However I want to...
Top