I'm assuming you mean the formula [tex]E = \frac{360}{n}[/tex] where E is the exterior angle measure and n is the number of sides.
This formula only works for regular polygons. Regular polygons have two important properties:
The side length number and angle value do not have to line up. We could have an equilateral triangle where each side is 10 inches long and the three angles are 60 degrees each. Any equilateral triangle is always a regular polygon.
For irregular polygons, we have polygons where one of those two items above (or both) are not the case. This means each exterior angle will not be the same. So we'd have to find another way of finding the exterior angle value.