Derivation:
Suppose, there is $m$ number of cells that are connected in parallel, each of whose emf is $E$ and internal resistance is $r$. An external resistance R is also connected with the combination. If $E_p$ is the total emf of the combination, and if $r_p$ is the equivalent internal resistance, then according to ohm's law the current $I_p$ will be
$$I_p=\frac{E_p}{R+r_p}$$
But as the cells are in parallel combination, the equivalent emf of the cells will be equal to the emf of any one cell, that is, $E_p=E$. Again, as the cells are in parallel combination, their internal resistances are also in parallel combination.
Thus, $$\frac{1}{r_p}=\frac{1}{r}+\frac{1}{r}+\frac{1}{r}+…=\frac{m}{r}$$
$$\therefore I_p=\frac{E}{R+\frac{r}{m}}$$
$$\implies I_p=\frac{mE}{mR+r}$$
Unfortunately, this formula doesn't work (see my equation for circuit 2 that I derived using the above formula and @cross's equation for the same, which he derived using Kirchhoff's voltage law: his is correct). So, why does this formula not work?
Best Answer
In that question, I had (incorrectly) followed the OP's diagram. What was missing in it was that the same current $I_p$ does not flow in both the cells. I have corrected this mistake now.
Take your diagram for example. The current $I_p$ occurs because a third of the current comes from each of the batteries. If you apply the loop law to any loop containing one of the batteries you will get: $$\sum \Delta V = 0 \rightarrow -I_p(R) -(I_p/3)(r) + E = 0 $$ which simplifies to: $$I_p = \frac{E}{R + r/3} = \frac{3E}{3R + r}$$ which is the same as given by your equation upon substituting $m = 3$.
Hope this helps.