If I'm performing an experiment using a spectrophotometer and I mistakenly forgot to close the lid on the spectrophotometer, would that affect my results?
It depends on the construction of the spectrophotometer, the wavelength of light you're detecting, and the sensitivity/accuracy that you're demanding of the result.
In the past I have used spectrophotometers which were completely missing their sample lid, with no appreciable detriment to the result. Several things were in my favor, though. The light path from the sample to the detector was suitably collumated, such that any light that wasn't coming from the sample was blocked. I was attempting to detect far UV wavelengths (e.g 260 nm), for which there is little to no ambient source - attempting to detect a wavelength at the peak of a fluorescent light wouldn't have been as successful. I also didn't need highly accurate results, and I was able to dilute my sample such that it fell within a region (~50% absorbance) that is least sensitive to small changes in the amount of light being received.
In your case? If you can retake your measurement "properly", then I'd recommend doing so. If not, you can run some tests (like user aaaaaaa suggests) with some other similar sample, seeing if the absorption readings for that wavelength are affected by having the lid open.