@XOR LX
The shear volume of the data generated is something to be considered. The breakdown of the cells used is below. This large volume of calculations could account for a lot of the difference between the single formula and the step approach.

@ Jamo31
There are two lists to the right of the data that contain all the 5 digit values that don't have duplicated digits . Column P has the 5 digit numbers without duplicated digits. Column Q has the 5 digit numbers that contain 3, 7 and 8 in any order.

Unless you have a fast computer with lots of memory, don't fill the formulae down the columns. It takes a long time to calculate. I just checked and there are 97532 5 digit values starting from 01234 to 98765 inclusive down column A. Multiply that by 12 (One column per digit and 2 columns for summary) and you have 1,170,384 with calculations before extracting the values into columns P and Q that have 36000 calculations. The total is then just over 1.2 million cells with calculations.