Usually when using Excel you will have your calculation mode set to "Automatic". This means that if you change one cell, any formulas or other cells that depend on that cell will be recaculated automatically.
Occasionally you may not want this behaviour and may change the calculation mode to "Manual". In this mode, when you change a cell any dependent cells are marked as "dirty" rather than being recalculated immediately. Dirty cells are recalculated when you press "F9".
You can find the Calculation Options in the "Formulas" tab in Excel.
When in Manual Calculation mode it is advisable to recalculate all dirty cells at the same time by pressing F9 as this means that when the calculation is finished everything will be in a consistent state. It is however possible to recalculate a single cell or a range of cells. You should only do this if you are absolutely sure what you are doing as otherwise it can lead to you seeing inconsistent results as some cells will be calculated but others might still be showing old values!
Calculating Just the Current Selection
To calculate a cell or range of cells you will need to use the Excel Object Model, as you would from VBA (but from Python!). You can read more about that here https://www.pyxll.com/docs/userguide/vba.html. We use the "Range.Calculate" (https://docs.microsoft.com/en-us/office/vba/api/Excel.Range.Calculate) method to trigger a calculation of a specific range.
Note: When using the "Range.Calculate" method all cells in the range are calculated, but the "Dirty" state of those cells is not updated. This means that if you calculate a range containing dirty cells and then later press F9 those cells will still be calculated again then as their dirty state has not been cleared. This can be surprising if you are not expecting it!
To calculate the current selection from Python the code is as follows:
from pyxll import xl_app
xl = xl_app()
xl.Selection.Calculate()
You can put this code in an Excel macro, menu, ribbon function or content menu. We'll use a macro here, but the code would be the same for the other options too. The following macro is run on the keyboard shortcut "Ctrl+Shift+R", and so after importing this code pressing "Ctrl+Shift+R" will recalculate the current selection.
from pyxll import xl_app, xl_macro
@xl_macro(shortcut="Ctrl+Shift+R")
def recalculate_selection():
xl = xl_app()
xl.Selection.Calculate()