Hello to all,
first of all, I am happy to have found this forum, so I would thank the founders, admins and moderators.
I would like to build an excel template where I can easily compare the commissions of each trade for different brokers.

So the first broker I would like to include in my excel template is Interactivebrokers.
Details about their commissions:

CAD (Canadian) 0,01 per share, minimum $1CAD per trade and maximum 0,5% of the trade value
USA 0,005 per share, minimum $1USD per trade and maximum 1% of the trade value

How can I formulate these two calculations?

Thank you!