Error Handling in Excel

kleinsim

New Member
Joined
Jun 20, 2008
Messages
4
I am comparing matching entries in two pivot tables using the GETPIVOTDATA command. I'd rather not create another pivot table for what I am doing but I just found that I have several entries in one pivot table that do not appear in the other. As you know when I try to look up, say, the corresponding value for apples in a pivot table that only has entries for peaches, plums, and strawberries I get a #REF! error. I was wondering whether there is a way to stop such errors from occuring by checking whether it will occur before it is executed in a style such as this: if(B2=0,"Div by 0",B3/B2).

Thanks bunches

kleinsi
 

Some videos you may like

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

schielrn

Well-known Member
Joined
Apr 4, 2007
Messages
6,939
Welcome to the Board!

You can do something to the fact like:

=if(iserror(B2),"Is error","Not error")

Hope that helps.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,385
Messages
5,601,328
Members
414,444
Latest member
lionking15

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