replace #DIV/0 with dash "-"

Buck4145

New Member
Joined
Sep 10, 2014
Messages
13
Good afternoon, I've been puzzling over this for quite a bit now. I have this formula which works perfectly untill such times as a nil value is part of the base data (as part of a seperate formula):

=AVERAGE(IF('Archived Trainees'!H8:H38="074-0",IF('Archived Trainees'!L8:L38="Complete - RTU",'Archived Trainees'!AP8:AP38))).

I know that I have to add in [Value if False] or an ISERROR however wherever I put it I get an error. Basically instead of #DIV/0 i would like it to return a dash "-". Thanks in advance.

Working from excel 2003.
 
Last edited:

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

davesweep

Well-known Member
Joined
Apr 30, 2007
Messages
510
Hi,

Like this:

=IF(ISERROR(formula),"-",formula)

in your case,

=IF(ISERROR(AVERAGE(IF('Archived Trainees'!H8:H38="074-0",IF('Archived Trainees'!L8:L38="Complete - RTU",'Archived Trainees'!AP8:AP38)))),"-",AVERAGE(IF('Archived Trainees'!H8:H38="074-0",IF('Archived Trainees'!L8:L38="Complete - RTU",'Archived Trainees'!AP8:AP38))))
 

Buck4145

New Member
Joined
Sep 10, 2014
Messages
13
Thankyou for this, I have one more issue to the above. I need to insert a condition ('Archived Trainees'!$F$8:$F$500<=DATE(2013,8,1) However I'm unsure where to place it within the formula. I have used this within the SUMPRODUCT and it works however wherever I place it in the below it comes up with an error.

=IF(ISERROR(AVERAGE(IF('Archived Trainees'!H8:H38="074-0",IF('Archived Trainees'!L8:L38="Complete - RTU",'Archived Trainees'!AP8:AP38)))),"-",AVERAGE(IF('Archived Trainees'!H8:H38="074-0",IF('Archived Trainees'!L8:L38="Complete - RTU",'Archived Trainees'!AP8:AP38))))

Cheers for your continued help
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,114
Messages
5,835,462
Members
430,358
Latest member
zzc1128

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top