Hidden and grouped cells can behave unexpectedly when copied or formatted, but Alt+; is the fix.