I am running windows 11 on a laptop. There is an option in control panel to make the computer go to sleep when the lid/display is closed. This also makes the computer wake from sleep when opening the lid. However, I want my laptop to not go to sleep when the lid is shut, but wake if it is currently sleeping and the laptop lid is opened. Is this possible? If so, how would I do this?
Not possible. The "switch" is a toggle. ON means suspend on close and wake up on open; OFF means do nothing on close or open. It has a BIOS (UEFI) component as well as a Windows Power Management component.
I have not seen a registry change that could affect this and such change could be dangerous if stuck on suspend and not releasing.
So you must use the options as they appear.
True for Windows 11, 10, 8, 7, and probably even farther back.