Hi there,
I'm new to the community. Please help me to follow the right procedures.
I have a problem with nestling and I need your help.
Here's the formula, it's a simple ifand formula. The formula works like a beauty until the last city (Yangon). Then the error message pops up.
The specified formula cannot be entered because it uses more than 64 levels of nestling
It consists of the cities, Bangkok, Phuket, KohSamui, etc. and the duration half-day, full-day, two-day, etc. so it pretty much repeats itself from the beginning up until the with all combinations of cities and duration. I will have more cities to add in the future, up to 50.
I hope it's not too long and doesn't cause confusion:
Thank you for helping me to crack this nut.
Kind regards
This is the formula that works up until Yangon:
=IF(AND($C4="Bangkok",$A4="shorter than half-day"),Accommodation!$B$2,IF(AND($C4="Bangkok",$A4="half-day"),Accommodation!$B$3,IF(AND($C4="Bangkok",$A4="full-day"),Accommodation!$B$4,IF(AND($C4="Bangkok",$A4="two-day"),Accommodation!$B$5,IF(AND($C4="Bangkok",$A4="longer than two days"),Accommodation!$B$6,IF(AND($C4="Phuket",$A4="shorter than half-day"),Accommodation!$C$2,IF(AND($C4="Phuket",$A4="half-day"),Accommodation!$C$3,IF(AND($C4="Phuket",$A4="full-day"),Accommodation!$C4,IF(AND($C4="Phuket",$A4="two-day"),Accommodation!$C$5,IF(AND($C4="Phuket",$A4="longer than two days"),Accommodation!$C$6,IF(AND($C4="Koh Samui",$A4="shorter than half-day"),Accommodation!$D$2,IF(AND($C4="Koh Samui",$A4="half-day"),Accommodation!$D$3,IF(AND($C4="Koh Samui",$A4="full-day"),Accommodation!$D$4,IF(AND($C4="Koh Samui",$A4="two-day"),Accommodation!$D$5,IF(AND($C4="Koh Samui",$A4="longer than two days"),Accommodation!$D$6,IF(AND($C4="Hua Hin",$A4="shorter than half-day"),Accommodation!$E$2,IF(AND($C4="Hua Hin",$A4="half-day"),Accommodation!$E$3,IF(AND($C4="Hua Hin",$A4="full-day"),Accommodation!$E$4,IF(AND($C4="Hua Hin",$A4="two-day"),Accommodation!$E$5,IF(AND($C4="Hua Hin",$A4="longer than two days"),Accommodation!$E$6,IF(AND($C4="Pattaya",$A4="shorter than half-day"),Accommodation!$F$2,IF(AND($C4="Pattaya",$A4="half-day"),Accommodation!$F$3,IF(AND($C4="Pattaya",$A4="full-day"),Accommodation!$F$4,IF(AND($C4="Pattaya",$A4="two-day"),Accommodation!$F$5,IF(AND($C4="Pattaya",$A4="longer than two days"),Accommodation!$F$6,IF(AND($C4="Chiang Mai",$A4="shorter than half-day"),Accommodation!$G$2,IF(AND($C4="Chiang Mai",$A4="half-day"),Accommodation!$G$3,IF(AND($C4="Chiang Mai",$A4="full-day"),Accommodation!$G$4,IF(AND($C4="Chiang Mai",$A4="two-day"),Accommodation!$G$5,IF(AND($C4="Chiang Mai",$A4="longer than two days"),Accommodation!$G$6, IF(AND($C4="Singapore",$A4="shorter than half-day"),Accommodation!$H$2,IF(AND($C4="Singapore",$A4="half-day"),Accommodation!$H$3,IF(AND($C4="Singapore",$A4="full-day"),Accommodation!$H$4,IF(AND($C4="Singapore",$A4="two-day"),Accommodation!$H$5,IF(AND($C4="Singapore",$A4="longer than two days"),Accommodation!$H$6, IF(AND($C4="Hong Kong",$A4="shorter than half-day"),Accommodation!$I$2,IF(AND($C4="Hong Kong",$A4="half-day"),Accommodation!$I$3,IF(AND($C4="Hong Kong",$A4="full-day"),Accommodation!$I$4,IF(AND($C4="Hong Kong",$A4="two-day"),Accommodation!$I$5,IF(AND($C4="Hong Kong",$A4="longer than two days"),Accommodation!$I$6,IF(AND($C4="Kuala Lumpur",$A4="shorter than half-day"),Accommodation!$J$2,IF(AND($C4="Kuala Lumpur",$A4="half-day"),Accommodation!$J$3,IF(AND($C4="Kuala Lumpur",$A4="full-day"),Accommodation!$J$4,IF(AND($C4="Kuala Lumpur",$A4="two-day"),Accommodation!$J$5,IF(AND($C4="Kuala Lumpur",$A4="longer than two days"),Accommodation!$J$6,IF(AND($C4="Jakarta",$A4="shorter than half-day"),Accommodation!$K$2,IF(AND($C4="Jakarta",$A4="half-day"),Accommodation!$K$3,IF(AND($C4="Jakarta",$A4="full-day"),Accommodation!$K$4,IF(AND($C4="Jakarta",$A4="two-day"),Accommodation!$K$5,IF(AND($C4="Jakarta",$A4="longer than two days"),Accommodation!$K$6,IF(AND($C4="Siem Reap",$A4="shorter than half-day"),Accommodation!$L$2,IF(AND($C4="Siem Reap",$A4="half-day"),Accommodation!$L$3,IF(AND($C4="Siem Reap",$A4="full-day"),Accommodation!$L$4,IF(AND($C4="Siem Reap",$A4="two-day"),Accommodation!$L$5,IF(AND($C4="Siem Reap",$A4="longer than two days"),Accommodation!$L$6,IF(AND($C4="Yangon",$A4="shorter than half-day"),Accommodation!$M$2,IF(AND($C4="Yangon",$A4="half-day"),Accommodation!$M$3, IF(AND($C4="Yangon",$A4="full-day"),Accommodation!$M$4,IF(AND($C4="Yangon",$A4="two-day"),Accommodation!$M$5,IF(AND($C4="Yangon",$A4="longer than two days"),Accommodation!$M$6 ))))))))))))))))))))))))))))))))))))))))))))))))))))))) )))))
This is the last part of the formula that doesn't work when added to the previous one:
,IF(AND($C4="Colombo",$A4="shorter than half-day"),'ACCOMMODATION'!$N$2,IF(AND($C4="Colombo",$A4="half-day"),'ACCOMMODATION'!$N$3,IF(AND($C4="Colombo",$A4="full-day"),'ACCOMMODATION'!$N$4,IF(AND($C4="Colombo",$A4="two-day"),'ACCOMMODATION'!$N$5,IF(AND($C4="Colombo",$A4="longer than two days"),'ACCOMMODATION'!$N$6 )))))
This is the entire formula that unfortunately doesn't work:
=IF(AND($C4="Bangkok",$A4="shorter than half-day"),Accommodation!$B$2,IF(AND($C4="Bangkok",$A4="half-day"),Accommodation!$B$3,IF(AND($C4="Bangkok",$A4="full-day"),Accommodation!$B$4,IF(AND($C4="Bangkok",$A4="two-day"),Accommodation!$B$5,IF(AND($C4="Bangkok",$A4="longer than two days"),Accommodation!$B$6,IF(AND($C4="Phuket",$A4="shorter than half-day"),Accommodation!$C$2,IF(AND($C4="Phuket",$A4="half-day"),Accommodation!$C$3,IF(AND($C4="Phuket",$A4="full-day"),Accommodation!$C4,IF(AND($C4="Phuket",$A4="two-day"),Accommodation!$C$5,IF(AND($C4="Phuket",$A4="longer than two days"),Accommodation!$C$6,IF(AND($C4="Koh Samui",$A4="shorter than half-day"),Accommodation!$D$2,IF(AND($C4="Koh Samui",$A4="half-day"),Accommodation!$D$3,IF(AND($C4="Koh Samui",$A4="full-day"),Accommodation!$D$4,IF(AND($C4="Koh Samui",$A4="two-day"),Accommodation!$D$5,IF(AND($C4="Koh Samui",$A4="longer than two days"),Accommodation!$D$6,IF(AND($C4="Hua Hin",$A4="shorter than half-day"),Accommodation!$E$2,IF(AND($C4="Hua Hin",$A4="half-day"),Accommodation!$E$3,IF(AND($C4="Hua Hin",$A4="full-day"),Accommodation!$E$4,IF(AND($C4="Hua Hin",$A4="two-day"),Accommodation!$E$5,IF(AND($C4="Hua Hin",$A4="longer than two days"),Accommodation!$E$6,IF(AND($C4="Pattaya",$A4="shorter than half-day"),Accommodation!$F$2,IF(AND($C4="Pattaya",$A4="half-day"),Accommodation!$F$3,IF(AND($C4="Pattaya",$A4="full-day"),Accommodation!$F$4,IF(AND($C4="Pattaya",$A4="two-day"),Accommodation!$F$5,IF(AND($C4="Pattaya",$A4="longer than two days"),Accommodation!$F$6,IF(AND($C4="Chiang Mai",$A4="shorter than half-day"),Accommodation!$G$2,IF(AND($C4="Chiang Mai",$A4="half-day"),Accommodation!$G$3,IF(AND($C4="Chiang Mai",$A4="full-day"),Accommodation!$G$4,IF(AND($C4="Chiang Mai",$A4="two-day"),Accommodation!$G$5,IF(AND($C4="Chiang Mai",$A4="longer than two days"),Accommodation!$G$6, IF(AND($C4="Singapore",$A4="shorter than half-day"),Accommodation!$H$2,IF(AND($C4="Singapore",$A4="half-day"),Accommodation!$H$3,IF(AND($C4="Singapore",$A4="full-day"),Accommodation!$H$4,IF(AND($C4="Singapore",$A4="two-day"),Accommodation!$H$5,IF(AND($C4="Singapore",$A4="longer than two days"),Accommodation!$H$6, IF(AND($C4="Hong Kong",$A4="shorter than half-day"),Accommodation!$I$2,IF(AND($C4="Hong Kong",$A4="half-day"),Accommodation!$I$3,IF(AND($C4="Hong Kong",$A4="full-day"),Accommodation!$I$4,IF(AND($C4="Hong Kong",$A4="two-day"),Accommodation!$I$5,IF(AND($C4="Hong Kong",$A4="longer than two days"),Accommodation!$I$6,IF(AND($C4="Kuala Lumpur",$A4="shorter than half-day"),Accommodation!$J$2,IF(AND($C4="Kuala Lumpur",$A4="half-day"),Accommodation!$J$3,IF(AND($C4="Kuala Lumpur",$A4="full-day"),Accommodation!$J$4,IF(AND($C4="Kuala Lumpur",$A4="two-day"),Accommodation!$J$5,IF(AND($C4="Kuala Lumpur",$A4="longer than two days"),Accommodation!$J$6,IF(AND($C4="Jakarta",$A4="shorter than half-day"),Accommodation!$K$2,IF(AND($C4="Jakarta",$A4="half-day"),Accommodation!$K$3,IF(AND($C4="Jakarta",$A4="full-day"),Accommodation!$K$4,IF(AND($C4="Jakarta",$A4="two-day"),Accommodation!$K$5,IF(AND($C4="Jakarta",$A4="longer than two days"),Accommodation!$K$6,IF(AND($C4="Siem Reap",$A4="shorter than half-day"),Accommodation!$L$2,IF(AND($C4="Siem Reap",$A4="half-day"),Accommodation!$L$3,IF(AND($C4="Siem Reap",$A4="full-day"),Accommodation!$L$4,IF(AND($C4="Siem Reap",$A4="two-day"),Accommodation!$L$5,IF(AND($C4="Siem Reap",$A4="longer than two days"),Accommodation!$L$6,IF(AND($C4="Yangon",$A4="shorter than half-day"),Accommodation!$M$2,IF(AND($C4="Yangon",$A4="half-day"),Accommodation!$M$3, IF(AND($C4="Yangon",$A4="full-day"),Accommodation!$M$4,IF(AND($C4="Yangon",$A4="two-day"),Accommodation!$M$5,IF(AND($C4="Yangon",$A4="longer than two days"),Accommodation!$M$6 ,IF(AND($C4="Colombo",$A4="shorter than half-day"),'ACCOMMODATION'!$N$2,IF(AND($C4="Colombo",$A4="half-day"),'ACCOMMODATION'!$N$3,IF(AND($C4="Colombo",$A4="full-day"),'ACCOMMODATION'!$N$4,IF(AND($C4="Colombo",$A4="two-day"),'ACCOMMODATION'!$N$5,IF(AND($C4="Colombo",$A4="longer than two days"),'ACCOMMODATION'!$N$6 ))))))))))))))))))))))))))))))))))))))))))))))))))))))) ))))) )))))
I'm new to the community. Please help me to follow the right procedures.
I have a problem with nestling and I need your help.
Here's the formula, it's a simple ifand formula. The formula works like a beauty until the last city (Yangon). Then the error message pops up.
The specified formula cannot be entered because it uses more than 64 levels of nestling
It consists of the cities, Bangkok, Phuket, KohSamui, etc. and the duration half-day, full-day, two-day, etc. so it pretty much repeats itself from the beginning up until the with all combinations of cities and duration. I will have more cities to add in the future, up to 50.
I hope it's not too long and doesn't cause confusion:
Thank you for helping me to crack this nut.
Kind regards
This is the formula that works up until Yangon:
=IF(AND($C4="Bangkok",$A4="shorter than half-day"),Accommodation!$B$2,IF(AND($C4="Bangkok",$A4="half-day"),Accommodation!$B$3,IF(AND($C4="Bangkok",$A4="full-day"),Accommodation!$B$4,IF(AND($C4="Bangkok",$A4="two-day"),Accommodation!$B$5,IF(AND($C4="Bangkok",$A4="longer than two days"),Accommodation!$B$6,IF(AND($C4="Phuket",$A4="shorter than half-day"),Accommodation!$C$2,IF(AND($C4="Phuket",$A4="half-day"),Accommodation!$C$3,IF(AND($C4="Phuket",$A4="full-day"),Accommodation!$C4,IF(AND($C4="Phuket",$A4="two-day"),Accommodation!$C$5,IF(AND($C4="Phuket",$A4="longer than two days"),Accommodation!$C$6,IF(AND($C4="Koh Samui",$A4="shorter than half-day"),Accommodation!$D$2,IF(AND($C4="Koh Samui",$A4="half-day"),Accommodation!$D$3,IF(AND($C4="Koh Samui",$A4="full-day"),Accommodation!$D$4,IF(AND($C4="Koh Samui",$A4="two-day"),Accommodation!$D$5,IF(AND($C4="Koh Samui",$A4="longer than two days"),Accommodation!$D$6,IF(AND($C4="Hua Hin",$A4="shorter than half-day"),Accommodation!$E$2,IF(AND($C4="Hua Hin",$A4="half-day"),Accommodation!$E$3,IF(AND($C4="Hua Hin",$A4="full-day"),Accommodation!$E$4,IF(AND($C4="Hua Hin",$A4="two-day"),Accommodation!$E$5,IF(AND($C4="Hua Hin",$A4="longer than two days"),Accommodation!$E$6,IF(AND($C4="Pattaya",$A4="shorter than half-day"),Accommodation!$F$2,IF(AND($C4="Pattaya",$A4="half-day"),Accommodation!$F$3,IF(AND($C4="Pattaya",$A4="full-day"),Accommodation!$F$4,IF(AND($C4="Pattaya",$A4="two-day"),Accommodation!$F$5,IF(AND($C4="Pattaya",$A4="longer than two days"),Accommodation!$F$6,IF(AND($C4="Chiang Mai",$A4="shorter than half-day"),Accommodation!$G$2,IF(AND($C4="Chiang Mai",$A4="half-day"),Accommodation!$G$3,IF(AND($C4="Chiang Mai",$A4="full-day"),Accommodation!$G$4,IF(AND($C4="Chiang Mai",$A4="two-day"),Accommodation!$G$5,IF(AND($C4="Chiang Mai",$A4="longer than two days"),Accommodation!$G$6, IF(AND($C4="Singapore",$A4="shorter than half-day"),Accommodation!$H$2,IF(AND($C4="Singapore",$A4="half-day"),Accommodation!$H$3,IF(AND($C4="Singapore",$A4="full-day"),Accommodation!$H$4,IF(AND($C4="Singapore",$A4="two-day"),Accommodation!$H$5,IF(AND($C4="Singapore",$A4="longer than two days"),Accommodation!$H$6, IF(AND($C4="Hong Kong",$A4="shorter than half-day"),Accommodation!$I$2,IF(AND($C4="Hong Kong",$A4="half-day"),Accommodation!$I$3,IF(AND($C4="Hong Kong",$A4="full-day"),Accommodation!$I$4,IF(AND($C4="Hong Kong",$A4="two-day"),Accommodation!$I$5,IF(AND($C4="Hong Kong",$A4="longer than two days"),Accommodation!$I$6,IF(AND($C4="Kuala Lumpur",$A4="shorter than half-day"),Accommodation!$J$2,IF(AND($C4="Kuala Lumpur",$A4="half-day"),Accommodation!$J$3,IF(AND($C4="Kuala Lumpur",$A4="full-day"),Accommodation!$J$4,IF(AND($C4="Kuala Lumpur",$A4="two-day"),Accommodation!$J$5,IF(AND($C4="Kuala Lumpur",$A4="longer than two days"),Accommodation!$J$6,IF(AND($C4="Jakarta",$A4="shorter than half-day"),Accommodation!$K$2,IF(AND($C4="Jakarta",$A4="half-day"),Accommodation!$K$3,IF(AND($C4="Jakarta",$A4="full-day"),Accommodation!$K$4,IF(AND($C4="Jakarta",$A4="two-day"),Accommodation!$K$5,IF(AND($C4="Jakarta",$A4="longer than two days"),Accommodation!$K$6,IF(AND($C4="Siem Reap",$A4="shorter than half-day"),Accommodation!$L$2,IF(AND($C4="Siem Reap",$A4="half-day"),Accommodation!$L$3,IF(AND($C4="Siem Reap",$A4="full-day"),Accommodation!$L$4,IF(AND($C4="Siem Reap",$A4="two-day"),Accommodation!$L$5,IF(AND($C4="Siem Reap",$A4="longer than two days"),Accommodation!$L$6,IF(AND($C4="Yangon",$A4="shorter than half-day"),Accommodation!$M$2,IF(AND($C4="Yangon",$A4="half-day"),Accommodation!$M$3, IF(AND($C4="Yangon",$A4="full-day"),Accommodation!$M$4,IF(AND($C4="Yangon",$A4="two-day"),Accommodation!$M$5,IF(AND($C4="Yangon",$A4="longer than two days"),Accommodation!$M$6 ))))))))))))))))))))))))))))))))))))))))))))))))))))))) )))))
This is the last part of the formula that doesn't work when added to the previous one:
,IF(AND($C4="Colombo",$A4="shorter than half-day"),'ACCOMMODATION'!$N$2,IF(AND($C4="Colombo",$A4="half-day"),'ACCOMMODATION'!$N$3,IF(AND($C4="Colombo",$A4="full-day"),'ACCOMMODATION'!$N$4,IF(AND($C4="Colombo",$A4="two-day"),'ACCOMMODATION'!$N$5,IF(AND($C4="Colombo",$A4="longer than two days"),'ACCOMMODATION'!$N$6 )))))
This is the entire formula that unfortunately doesn't work:
=IF(AND($C4="Bangkok",$A4="shorter than half-day"),Accommodation!$B$2,IF(AND($C4="Bangkok",$A4="half-day"),Accommodation!$B$3,IF(AND($C4="Bangkok",$A4="full-day"),Accommodation!$B$4,IF(AND($C4="Bangkok",$A4="two-day"),Accommodation!$B$5,IF(AND($C4="Bangkok",$A4="longer than two days"),Accommodation!$B$6,IF(AND($C4="Phuket",$A4="shorter than half-day"),Accommodation!$C$2,IF(AND($C4="Phuket",$A4="half-day"),Accommodation!$C$3,IF(AND($C4="Phuket",$A4="full-day"),Accommodation!$C4,IF(AND($C4="Phuket",$A4="two-day"),Accommodation!$C$5,IF(AND($C4="Phuket",$A4="longer than two days"),Accommodation!$C$6,IF(AND($C4="Koh Samui",$A4="shorter than half-day"),Accommodation!$D$2,IF(AND($C4="Koh Samui",$A4="half-day"),Accommodation!$D$3,IF(AND($C4="Koh Samui",$A4="full-day"),Accommodation!$D$4,IF(AND($C4="Koh Samui",$A4="two-day"),Accommodation!$D$5,IF(AND($C4="Koh Samui",$A4="longer than two days"),Accommodation!$D$6,IF(AND($C4="Hua Hin",$A4="shorter than half-day"),Accommodation!$E$2,IF(AND($C4="Hua Hin",$A4="half-day"),Accommodation!$E$3,IF(AND($C4="Hua Hin",$A4="full-day"),Accommodation!$E$4,IF(AND($C4="Hua Hin",$A4="two-day"),Accommodation!$E$5,IF(AND($C4="Hua Hin",$A4="longer than two days"),Accommodation!$E$6,IF(AND($C4="Pattaya",$A4="shorter than half-day"),Accommodation!$F$2,IF(AND($C4="Pattaya",$A4="half-day"),Accommodation!$F$3,IF(AND($C4="Pattaya",$A4="full-day"),Accommodation!$F$4,IF(AND($C4="Pattaya",$A4="two-day"),Accommodation!$F$5,IF(AND($C4="Pattaya",$A4="longer than two days"),Accommodation!$F$6,IF(AND($C4="Chiang Mai",$A4="shorter than half-day"),Accommodation!$G$2,IF(AND($C4="Chiang Mai",$A4="half-day"),Accommodation!$G$3,IF(AND($C4="Chiang Mai",$A4="full-day"),Accommodation!$G$4,IF(AND($C4="Chiang Mai",$A4="two-day"),Accommodation!$G$5,IF(AND($C4="Chiang Mai",$A4="longer than two days"),Accommodation!$G$6, IF(AND($C4="Singapore",$A4="shorter than half-day"),Accommodation!$H$2,IF(AND($C4="Singapore",$A4="half-day"),Accommodation!$H$3,IF(AND($C4="Singapore",$A4="full-day"),Accommodation!$H$4,IF(AND($C4="Singapore",$A4="two-day"),Accommodation!$H$5,IF(AND($C4="Singapore",$A4="longer than two days"),Accommodation!$H$6, IF(AND($C4="Hong Kong",$A4="shorter than half-day"),Accommodation!$I$2,IF(AND($C4="Hong Kong",$A4="half-day"),Accommodation!$I$3,IF(AND($C4="Hong Kong",$A4="full-day"),Accommodation!$I$4,IF(AND($C4="Hong Kong",$A4="two-day"),Accommodation!$I$5,IF(AND($C4="Hong Kong",$A4="longer than two days"),Accommodation!$I$6,IF(AND($C4="Kuala Lumpur",$A4="shorter than half-day"),Accommodation!$J$2,IF(AND($C4="Kuala Lumpur",$A4="half-day"),Accommodation!$J$3,IF(AND($C4="Kuala Lumpur",$A4="full-day"),Accommodation!$J$4,IF(AND($C4="Kuala Lumpur",$A4="two-day"),Accommodation!$J$5,IF(AND($C4="Kuala Lumpur",$A4="longer than two days"),Accommodation!$J$6,IF(AND($C4="Jakarta",$A4="shorter than half-day"),Accommodation!$K$2,IF(AND($C4="Jakarta",$A4="half-day"),Accommodation!$K$3,IF(AND($C4="Jakarta",$A4="full-day"),Accommodation!$K$4,IF(AND($C4="Jakarta",$A4="two-day"),Accommodation!$K$5,IF(AND($C4="Jakarta",$A4="longer than two days"),Accommodation!$K$6,IF(AND($C4="Siem Reap",$A4="shorter than half-day"),Accommodation!$L$2,IF(AND($C4="Siem Reap",$A4="half-day"),Accommodation!$L$3,IF(AND($C4="Siem Reap",$A4="full-day"),Accommodation!$L$4,IF(AND($C4="Siem Reap",$A4="two-day"),Accommodation!$L$5,IF(AND($C4="Siem Reap",$A4="longer than two days"),Accommodation!$L$6,IF(AND($C4="Yangon",$A4="shorter than half-day"),Accommodation!$M$2,IF(AND($C4="Yangon",$A4="half-day"),Accommodation!$M$3, IF(AND($C4="Yangon",$A4="full-day"),Accommodation!$M$4,IF(AND($C4="Yangon",$A4="two-day"),Accommodation!$M$5,IF(AND($C4="Yangon",$A4="longer than two days"),Accommodation!$M$6 ,IF(AND($C4="Colombo",$A4="shorter than half-day"),'ACCOMMODATION'!$N$2,IF(AND($C4="Colombo",$A4="half-day"),'ACCOMMODATION'!$N$3,IF(AND($C4="Colombo",$A4="full-day"),'ACCOMMODATION'!$N$4,IF(AND($C4="Colombo",$A4="two-day"),'ACCOMMODATION'!$N$5,IF(AND($C4="Colombo",$A4="longer than two days"),'ACCOMMODATION'!$N$6 ))))))))))))))))))))))))))))))))))))))))))))))))))))))) ))))) )))))