gezzer1520
New Member
- Joined
- Jul 29, 2015
- Messages
- 5
I am trying to create a spreadsheet which contains a list of bills, such as Gas, Electric, telephone etc., each of which is payable on a set day each month. The spreadsheet lists these bills in the first column, and then has a column for each week of the year, with Monday as the first day of the week. I now want to take the list of due dates e.g. Gas due 4th each month, electric due 20th each month etc and use this to populate the sheet showing what bills are due in which weeks. It seems simple, but I am running into problems. I put the due dates (which is just a number) in a table on sheet 2, and use VLOOKUP to match the bill description from the main spreadsheet to find the relevant payment in the table. Within the VLOOKUP it takes the start day of the week (Monday) and uses this date and this date plus 6 days, to give Monday to Sunday, and checks to see if the due date is between these two dates. So, for example, due date of 5 falls between week start and end dates of 4th and 10th so the payment amount would populate the sheet correctly. The problem occurs when Monday to the following Sunday falls over a month end. In the above example, 5 is greater than 4 AND less than 10 so it works. However with Monday 28th as a start date, we get something like 28th and 4th as the week start and end dates. In that case 30th, which is between those two dates would fail, as 30 is greater than 28 but also needs to be less than 4, which it is not. I have tried different date formats etc., but it seems that the due date (just a number)