What are you defining as "Heavy Atoms", it was my understanding that Iodine was the only heavy atom in your given list, maybe things have changed since my day.
A few more example formulae would be an advantage, perhaps if you were to provide a sample workbook with a couple of dozen examples and the expected results, we might be able to provide a more definitive solution.
In the meantime, try this UDF
I have left a formula in this attachment, but I think it over simplifies the situation, as does to a lesser extent the UDF as it stands.
I have added a few random molecular formulae to illustrate the point.
The final solution will probably involve comparing the given formula to the entire periodic table, and even then a bit more "tweeking" will be required.
Bookmarks