Identify your Madeira role in the recipe: sweetness (port-like) vs nutty oxidation (sherry/marsala) vs moisture + lift.
Choose the closest substitute from the table and apply the listed ratio to your Madeira amount.
If your substitute is sweeter (port or sweetened grape juice), reduce other added sugar slightly or add a small pinch of salt.
If your substitute is sharper (vinegar-based), use a smaller correction step: reduce vinegar next time rather than changing the whole batch.
Bake as written, then taste the finished crumb/icing and adjust in future batches (sweetness or acidity) with small increments.