A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Please do not run John's command if you are not using Office 2024 LTSC /Standard/ Pro Plus edition.
What edition you use matters before any solution can be given.
It was a known issue, and a potential workaround has been rolling back to a previous stable version, but it is important to know if you are on 2016, 2019, 2021 or 2024 before a correct command can be given.
However, Microsoft has already rolled out some fixe for this issue.
If you have 2016, KB5002665 can be installed to fix this issue, although conditional-formatting cases can still fail.
Office LTSC 2024: fixed in Build 17932.21000 (Update via Excel Files > Accounts > Update Options > Update now)
Office LTSC 2021: fixed in Build 14334.20918
Office LTSC 2019: mitigated in Build 10417.20208, but Microsoft says paste can still fail in workbooks containing conditional formatting.