Identify your use: melting/gratin (choose a Swiss-style hard cheese) vs. sprinkling/grating (choose an aged hard cheese like Comté or Parmesan).
Start with the listed ratio (use 1:1 for most swaps; use ¾:1 for Parmesan).
If the substitute is milder (like Emmental), increase perceived flavor with black pepper, a tiny pinch of salt, or a splash of lemon at the end.
If the substitute is sharper/saltier (like Parmesan), reduce any added salt in the dish and taste after heating.
For best texture, match the cut: slice for stovetop melts, grate for even melt in baked dishes, and keep rind/fine bits only if your dish tolerates stronger flavor.