I am using this formula to get data from the sheet 'Uge1', but only if no one of the cells 'Uge1!D4' and 'Uge1!E4' are empty.

=HVIS(ELLER(ER.TOM(Uge1!D4);(ER.TOM(Uge1!E4)));"";HVIS(MINUT(Uge1!D4)>0;TIME(Uge1!D4)&"."&MINUT(Uge1!D4);TIME(Uge1!D4))&"-"&HVIS(MINUT(Uge1!E4)>0;TIME(Uge1!E4)&"."&MINUT(Uge1!E4);TIME(Uge1!E4))&" "&Uge1!F4)
And here it is translated with my best school- english:

=IF(OR(IS.EMPTY(Uge1!D4);(IS.EMPTY(Uge1!E4)));"";IF(MINUTE(Uge1!D4)>0;HOUR(Uge1!D4)&"."&MINUTE(Uge1!D4);HOUR(Uge1!D4))&"-"&IF(MINUTE(Uge1!E4)>0;HOUR(Uge1!E4)&"."&MINUTE(Uge1!E4);HOUR(Uge1!E4))&" "&Uge1!F4)
Is it possible to expand the conditions so that if the cell 'Uge1!F4' is different from 'Rulleplan!D4', then target cell is not left empty (the part og formula after ;""; is getting the data)?

I have been trying this:

=IF(OR(IS.EMPTY(Uge1!D4);(IS.EMPTY(Uge1!E4)));Uge1!F4=Rulleplan!D4;"";IF(MIN ....
but get error.