Thanks @Calle_Hedberg and @pauv for all your help and advice on this. After a bit of experimentation, one of our developers pointed us towards a solution. We simply add the following onto the URL of our site and then imported the resulting xml into Excel:
/api/userGroups?&fields=name,users%5BdisplayName,userCredentials%5Busername%5D%5D&paging=false
From this we can easily see which users we might need to disable when a programme comes to an end, and see which users are the members of multiple user groups (and so should just be removed from the user group rather than disabled).
This seems to work for us- obviously we would still have to disable each user individually, but this gives us a much quicker way to see the information we need.
Anna