The weather in Worksop followed weeks of hot and dry conditions, which broke all-time temperature records.
Bassetlaw Hospital said the huge rainfall had caused water to get into parts of its building and cause operational issues on its internal roads.
On Wednesday 17 August, it reiterated people should only come to the hospital if if their need is "urgent or life threatening".
Customers filmed parts of the ceiling collapse as they shopped in an Aldi supermarket
What are the flood alerts in Nottinghamshire?
Flood alerts remain in place across the county. There is currently an alert that flooding is possible for the River Leen, Day Brook and Tottle Brook in Nottinghamshire.
The Government body also said flooding was possible at the River Maun in Nottinghamshire due to localised thunderstorms. Follow this blog for updates throughout the day.
Patients urged to avoid A&E ‘unless in urgent need’ after flooding
A hospital has urged patients only to attend A&E if their need is “urgent or life-threatening” after the building was flooded.
Bassetlaw Hospital in Worksop, Nottinghamshire, said that heavy rainfall meant “water was able to get into a few parts of the building”.
The hospital said in a Facebook post that colleagues were “hard at work” fixing the problem.
“Please note, we continue to ask local people in Worksop to only attend the Emergency Department at Bassetlaw Hospital if your need is urgent or life-threatening,” it said.
“Due to the rain yesterday, water was able to get into a few parts of the building which colleagues are hard at work fixing – work we hope to finish soon.
“If you need advice, please call NHS 111.”
Environment Agency statement after "intense" rainfall causes flooding
A spokesperson for the Environment Agency said: “A three-hour accumulation of localised, intense rainfall last night resulted in surface water flooding in Worksop.
"Environment Agency officers were on site supporting partners and preparing in case of fluvial flooding.
"The water quickly receded and the River Ryton did not overtop its banks.
"We are on site again today monitoring the situation continuing to support partners."
What does the risk of flooding and thunderstorms mean?
The yellow weather alerts of torrential rain in parts of the country could cause delays to train services, short-term power outages and flooding of some homes, according to the Met Office.
It has also warned of potential damage to buildings from lightning strikes.
The Met Office is also advising people to take care in wet weather and expect poor driving conditions due to spray and power cuts.