Find the sum of all 4 digit numbers which are formed by the digits 1,2,5,6?
In this answer I presume that all digits $1,2,5,6$ must be present in the number.
There are $4!=24$ such numbers.
We can index them with $i=1,\dots,24$ and write each of them as $$n_{i}=a_{i}+10b_{i}+100c_{i}+1000d_{i}$$ where $\left\{ a_{i},b_{i},c_{i},d_{i}\right\}=\{1,2,5,6\} $
Then $$\sum_{i=1}^{24}n_{i}=\sum_{i=1}^{24}a_{i}+10\sum_{i=1}^{24}b_{i}+100\sum_{i=1}^{24}c_{i}+1000\sum_{i=1}^{24}d_{i}$$
$\left\{ i\mid a_{i}=1\right\} $, $\left\{ i\mid a_{i}=2\right\} $, $\left\{ i\mid a_{i}=5\right\} $ and $\left\{ i\mid a_{i}=6\right\} $ have equal cardinality $\frac{24}4=6$ so: $$\sum_{i=1}^{24}a_{i}=6.1+6.2+6.5+6.6=6(1+2+5+6)=84$$
This can also be applied for $b,c$ and $d$ and finally we find: $$\sum_{i=1}^{24}n_{i}=84+10.84+100.84+1000.84=1111.84=93324$$
Does this really answers your question? If not, then please let me know.