I have a very complicated formula:
=if(
and(A$1>$W4, A$1<=$X4, $X4>B$1),
$U4,
if(and($W4>=A$1,$W4<B$1),
days(B$1,$W4)*($U4/days(B$1,A$1))+0,
if(and($X4>A$1,$X4<=B$1),
days($X4,A$1)*($U4/days(B$1,A$1)),
0)))
And rather than type 'Other Sheet'!cell for every cell reference, I would like to know if there's a way I can describe the entire sheet prior to referencing cells from that sheet. I thought that perhaps this would work but it obviously doesn't. Any solutions?
=query('othersheet'!cell:cell,if(
and(A$1>$W4, A$1<=$X4, $X4>B$1),
$U4,
if(and($W4>=A$1,$W4<B$1),
days(B$1,$W4)*($U4/days(B$1,A$1))+0,
if(and($X4>A$1,$X4<=B$1),
days($X4,A$1)*($U4/days(B$1,A$1)),
0))))
Aucun commentaire:
Enregistrer un commentaire