tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,197
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi Everyone,
I'm trying to find a way (formulas or VBA but formulas preferred I can work out how many days per year I rented out a holiday home,
I've simplified it by just showing a small amount of data but hopefully you will see my problems.
<tbody>
</tbody>
So hope the chart helps, its the results in red I'm having trouble getting.
please help if you can
Tony
I'm trying to find a way (formulas or VBA but formulas preferred I can work out how many days per year I rented out a holiday home,
I've simplified it by just showing a small amount of data but hopefully you will see my problems.
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | |
1 | |||||||||||||||||||
2 | Lease Start Date (dd/mm/yyyy) <strike></strike> | <strike></strike>Lease End Date | Number of days rented (i'm just using the formula =C3-B3 for this.) | 2012 | 2013 | 2014 | 2015 | 2016 | 2017 | 2018 | 2019 | ||||||||
3 | 01/02/2012 | 15/07/2012 | 165 | so because both start and end date is in 2012 I just need the formula to put "165" in here. | |||||||||||||||
4 | 15/07/2013 | 15/3/2014 | but heres my big problem, if the lease date goes between two years how do I split it up??? | ||||||||||||||||
5 | Below is the result I'd like to see | ||||||||||||||||||
6 | Lease Start Date (dd/mm/yyyy) <strike></strike> | Lease End Date | Number of Days Rented | 2012 | 2013 | 2014 | 2015 | 2016 | 2017 | 2018 | 2019 | ||||||||
7 | 1/2/2012 | 1/6/2012 | 121 | 121 | |||||||||||||||
8 | 1/5/2018 | 2/5/2019 | 366 | 244 | 122 | ||||||||||||||
9 | 1/4/2016 | 1/8/2016 | 122 | 122 | |||||||||||||||
10 | 1/8/2016 | 1/3/2017 | 212 | 152 | 60 | ||||||||||||||
11 | 1/11/2013 | 1/2/2014 | 92 | 60 | 32 | ||||||||||||||
12 | |||||||||||||||||||
13 | |||||||||||||||||||
14 |
<tbody>
</tbody>
So hope the chart helps, its the results in red I'm having trouble getting.
please help if you can
Tony