In a working XLSX, put 5 sessions in B2 and 3 hours per session in B3. Enter =B2*B3 in B4 and confirm the starting value of 15.

Set the target on the formula cell

In Ulet choose Data → What-If Analysis → Goal Seek. Use B4 for Set cell, 24 for To value, and B2 for By changing cell. Choose Solve.

The starting model has five sessions, three hours each and a calculated total of 15 hours.

Illustrated initial conditions. B2 is the adjustable input.

Check the input against the schedule

Expect B2 to be 8. B3 should still be 3 and B4 should reach 24. When a different target yields a fraction of a session, test the nearest feasible whole-session counts and decide whether to meet or exceed the target.

The solved example has eight sessions and 24 hours while B3 stays at three.

Illustrated equation check after solving.

Related Microsoft Excel reference