I am trying to figure out how get a false result for “Hotel” if “Air”, “Stop”, “Car”, or “Rail” are FALSE for the traveler and location. The below traveler evaluates FALSE for “Air” and “Stop”, and TRUE for “Hotel”, because of the formula I am using.
The other issue is, not all travelers have multiple leg types. If the below traveler only had a “Hotel” my formula works.
I appreciate any help I can get! I know enough excel/VBA to be dangerous... but, this is making my head hurt . Thank in advance!
Time / Date for Evaluation:
1. Dashboard $F$7 = 12/7/2017 10:54:00 AM
2. Dashboard $G$7 = 12/7/2017 0:00:00 AM (For Leg Type Hotel Only)
Leg Type Definitions in reference to the To Location, and To Date/Time:
1. Air: Date/Time of Arrival
2. Stop: Date/Time of Departure
3. Hotel: Date of stay
4. Car: Date/Time of Drop-off
5. Rail: Date/Time of Arrival
Formulas:
1. Count Air: =AND([@[LEG TYPE]]="AIR", [@[TO DATE (Local Time)]] <= Dashboard!$F$7)
2. Count Stop: =AND([@[LEG TYPE]]="STOP",[@[FROM DATE (Local Time)]]<=Dashboard!$F$7, [@[TO DATE (Local Time)]] >= Dashboard!$F$7)
3. Count Hotel: =AND([@[LEG TYPE]]="Hotel",[@[FROM DATE (Local Time)]]<=Dashboard!$G$7,[@[TO DATE (Local Time)]]>=Dashboard!$G$7)
4. Count Car: =AND([@[LEG TYPE]]="Car", [@[TO DATE (Local Time)]] >= Dashboard!$F$7)
5. Count Rail: =AND([@[LEG TYPE]]="Rail", [@[TO DATE (Local Time)]] >= Dashboard!$F$7)
6. Boots On The Ground: =OR([@[Count AIR]],[@[Count Stop]],[@[Count Hotel]],[@[Count Car]],[@[Count Rail]] =TRUE)
Stuff I was trying...
7. Count of Leg Types: =COUNTIFS([LEG TYPE],">""",[TRAVELER],[@<wbr>TRAVELER],[TO LOCATION],[@[TO LOCATION]])
8. Column1: =IF(COUNTIFS([LEG TYPE],"Hotel",[TRAVELER],[@<wbr>TRAVELER],[TO LOCATION],[@[TO LOCATION]]),COUNTIFS([LEG TYPE],">""",[TRAVELER],[@<wbr>TRAVELER],[TO LOCATION],[@[TO LOCATION]]),"")
The other issue is, not all travelers have multiple leg types. If the below traveler only had a “Hotel” my formula works.
I appreciate any help I can get! I know enough excel/VBA to be dangerous... but, this is making my head hurt . Thank in advance!
Time / Date for Evaluation:
1. Dashboard $F$7 = 12/7/2017 10:54:00 AM
2. Dashboard $G$7 = 12/7/2017 0:00:00 AM (For Leg Type Hotel Only)
Leg Type Definitions in reference to the To Location, and To Date/Time:
1. Air: Date/Time of Arrival
2. Stop: Date/Time of Departure
3. Hotel: Date of stay
4. Car: Date/Time of Drop-off
5. Rail: Date/Time of Arrival
Formulas:
1. Count Air: =AND([@[LEG TYPE]]="AIR", [@[TO DATE (Local Time)]] <= Dashboard!$F$7)
2. Count Stop: =AND([@[LEG TYPE]]="STOP",[@[FROM DATE (Local Time)]]<=Dashboard!$F$7, [@[TO DATE (Local Time)]] >= Dashboard!$F$7)
3. Count Hotel: =AND([@[LEG TYPE]]="Hotel",[@[FROM DATE (Local Time)]]<=Dashboard!$G$7,[@[TO DATE (Local Time)]]>=Dashboard!$G$7)
4. Count Car: =AND([@[LEG TYPE]]="Car", [@[TO DATE (Local Time)]] >= Dashboard!$F$7)
5. Count Rail: =AND([@[LEG TYPE]]="Rail", [@[TO DATE (Local Time)]] >= Dashboard!$F$7)
6. Boots On The Ground: =OR([@[Count AIR]],[@[Count Stop]],[@[Count Hotel]],[@[Count Car]],[@[Count Rail]] =TRUE)
Stuff I was trying...
7. Count of Leg Types: =COUNTIFS([LEG TYPE],">""",[TRAVELER],[@<wbr>TRAVELER],[TO LOCATION],[@[TO LOCATION]])
8. Column1: =IF(COUNTIFS([LEG TYPE],"Hotel",[TRAVELER],[@<wbr>TRAVELER],[TO LOCATION],[@[TO LOCATION]]),COUNTIFS([LEG TYPE],">""",[TRAVELER],[@<wbr>TRAVELER],[TO LOCATION],[@[TO LOCATION]]),"")