I'm trying to make a custom number format that displays both decimals only when needed but also uses the thousands separator comma. For example...

1,000
1,000.14
45.22
35
35,000
35,000.56

Is this possible?

Thanks!