Please do not post pictures of code only!
Post code within code tags in addition to pictures (see here).
Also post fully reproducible code without missing variables.
Your first IIf
call has one bracket too many and at the end you appear to have 2 brackets too less.
BTW, are you sure you need subscripts??
Also you look into the future via [1]
.
BTW you can look up further details of an error message in help very easily: