Reputation:
I want to tell excel to do the following in a single cell:
##IF T2=1 AND there is any number both in E2 and F2, THEN Sum(C2:F2) - 4, BUT IF T2 =1, but F2 is empty THEN sum(C2:E2) – 3, ALSO, IF T2 = 1, but both E2 and F2 are empty THEN sum(C2:D2) – 2, FINALLY, IF T2=0, THEN C2 – 1##
Upvotes: 0
Views: 34
Reputation: 152525
The formula you want is:
=IF(T2=0,C2-1,SUM(C2:F2)-COUNT(C2:F2))
Upvotes: 2