Forum Discussion
TomerIwanir
Feb 09, 2025Copper Contributor
Formula assistant
Hi All, Attached the following pic: Im trying to create the yellow cells by formula (I made it manually) the rules: if the column date and the raw date is a match so it should give us col...
- Feb 09, 2025
I recommend that you add a "counter" row as shown in row 2 below so you can accomplish this. Then the formula in I6 can be:
=IF($C6=I$1,$H6,IF(I$2-MATCH($C6,$I$1:$T$1)=1,$H6/4*(-3),IF(AND(I$2-MATCH($C6,$I$1:$T$1)>1,I$2-MATCH($C6,$I$1:$T$1)<5),($H6/4*(-3))/3,0)))
=IF($C6=I$1,$H6,IF(I$2-MATCH($C6,$I$1:$T$1)=1,$H6/4*(-3),IF(AND(I$2-MATCH($C6,$I$1:$T$1)>1,I$2-MATCH($C6,$I$1:$T$1)<5),($H6/4*(-3))/3,0)))
Copy across and down. It can be simplified a little bit to =LET(baseval,MATCH($C6,$I$1:$T$1),IF($C6=I$1,$H6,IF(I$2-baseval=1,$H6/4*(-3),IF(AND(I$2-baseval>1,I$2-baseval<5),($H6/4*(-3))/3,0))))
=LET(baseval,MATCH($C6,$I$1:$T$1),IF($C6=I$1,$H6,IF(I$2-baseval=1,$H6/4*(-3),IF(AND(I$2-baseval>1,I$2-baseval<5),($H6/4*(-3))/3,0))))
HansVogelaar
Feb 09, 2025MVP
In I6:
=IF(I$1=$C6, $H6, IF(AND(I$1>$C6, I$1<EDATE($C6, 3)), -3/4*H6, 0))
Fill down and to the right.