Phone number formatting

We are collecting leads in Google sheet via multiple channels.

Phone number format is different for some leads, for example
98765 43310 ( Space is there)
919876543210 ( Country code is there)

We are looking to have only 10 digits number numbers

How to do it, please advise.

I think you need to have a specific category to give the right treatment to each category.

For the second one, use a substitute formula in the sheet to replace the blank space by a null character.

For the third one, to keep it in the editor, maybe you can try dividing by 10^10, then use a template column and math column to take the first two numbers as a new value (basically trying to take the first 2 numbers out), then take the original number minus new value*10^10 to take the final 10 numbers. Be careful with rounding up.