1

I have a table that lists hotel reservations by ID, each with a check in and check out dates. I can sort this by ID, but I need to distribute (on a separate column) each day of the stay (Starting with the check in date and excluding the check out date).

I hope the file in the link below explains what I mean (The intended result column is listed as "Target")

https://www.dropbox.com/s/p0dt285lnntne7k/CHALLENGE.xlsx

Thank you so much in advance!

smoodin
  • 35
  • 3
  • What have you tried ? You can use formulas to add to dates eg `=A1+1` gives you the next day after the date in A1. – Tim Williams May 08 '14 at 17:25
  • I have tried using COUNTIF and COUNTIFS in order to differentiate a range within the same reservation ID but haven't succeeded yet. – smoodin May 08 '14 at 17:32
  • I'm not even sure what you're trying to acheive. It would help to update your workbook to show exactly what the "after" layout looks like. – Tim Williams May 08 '14 at 18:58
  • Hi Tim, the workbook has a "Target" column, the Answer proposed by pnuts worked just fine. – smoodin May 08 '14 at 19:46

1 Answers1

1

Please try:

=IF(A1=A2,D1+1,B2)  

in D2 and copied down to suit.

pnuts
  • 58,317
  • 11
  • 87
  • 139