Thank you. This worked on my sample spreadsheet screenshotted. Took a while to finally adapt to my actual spreadsheet where there are 3tabs and the ranges in slightly different rows etc but finally got it working...
Please see below a simplified example of the spreadsheet I'm working on. This data will be on three separate tabs and I've got to keep the data in that format which is proving difficult with it effectively transposed.
I need to to calculate the total cost based on the day number, using the sum...