Jediantman
New Member
I have a bit of a nightmare with an IF function that will need to calculate based on the value of one cell. All very simple so far, except that there are 56 potential values for that cell so I can't use a nested if to just perform what I want. I've tried to combine it with a lookup to make it easier but I run into the same issue where I need to qualify the result with the same 56 combinations.
What I need to do is work out the date that a report is due, but that date must take into account the holidays of the authority the report is for. Out of the 56 authorities there are 8 different combinations of the holiday dates so I have used named ranges to make it easier to understand (and what I hoped - easier to calculate) but there obviously needs to be a way that can match which authority has been selected, then what holidays apply before returning the correct date.
This is what I've been working on and I've tried various alternatives with mixed result but the current format returns only the first part of the nested IF (basically if the value of F23 is found in my table it will refer to 'Rutlandhols'):
=IF(HLOOKUP(F23,Holidays!$K$2:$BM$19,1,FALSE),IF(OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,Rutlandhols)),IF((OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,NhantsHols)),IF(OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,SolHols)),IF(OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,DudleyLeicsHols)),IF(OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,Group1Hols)),IF(OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,Group2Hols)),IF(OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,HackIsliHols)),IF(OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,Group3Hols)),IF(OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,PboroHols)))))))))))
Help me Excel magicians, please....
What I need to do is work out the date that a report is due, but that date must take into account the holidays of the authority the report is for. Out of the 56 authorities there are 8 different combinations of the holiday dates so I have used named ranges to make it easier to understand (and what I hoped - easier to calculate) but there obviously needs to be a way that can match which authority has been selected, then what holidays apply before returning the correct date.
This is what I've been working on and I've tried various alternatives with mixed result but the current format returns only the first part of the nested IF (basically if the value of F23 is found in my table it will refer to 'Rutlandhols'):
=IF(HLOOKUP(F23,Holidays!$K$2:$BM$19,1,FALSE),IF(OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,Rutlandhols)),IF((OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,NhantsHols)),IF(OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,SolHols)),IF(OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,DudleyLeicsHols)),IF(OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,Group1Hols)),IF(OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,Group2Hols)),IF(OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,HackIsliHols)),IF(OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,Group3Hols)),IF(OR(ISBLANK(L23),L23=""),"",WORKDAY(BJ23,4,PboroHols)))))))))))
Help me Excel magicians, please....