I am using the formula below to calculate 10,000 or any number in column A divided by 365 days and multiply by 10 and calculate the result by a number in G1 if value in column B is "YES" or calculate by a number in H1 if the value in column B is "NO". I get the desired result when I have YES value but it gives me zero when I have NO in column B. Would you please amend the formula to get the desired correct result whether the value is "YES" or "NO" in column B.
[TABLE="class: Table TableWordWrap SCXW199349199, width: 0"]
<tbody>[TR="class: TableRow TableRowSelected"]
[TD="bgcolor: transparent"] 2 (number in cell G1)
[/TD]
[TD="bgcolor: transparent"]3 (number in cell H1)
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: Table TableWordWrap SCXW199349199, width: 0"]
<tbody>[TR="class: TableRow TableRowSelected"]
[TD="bgcolor: transparent"]Column A
[/TD]
[TD="bgcolor: transparent"]Column B
[/TD]
[TD="bgcolor: transparent"]Column C
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]Desired result
Column D
[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR="class: TableRow TableRowSelected"]
[TD="bgcolor: transparent"]10000
[/TD]
[TD="bgcolor: transparent"]YES
[/TD]
[TD="bgcolor: transparent"]=(B1="YES")*A1/365*10*G1+(B1="NO")*A1/365*10*H1
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]548
[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR="class: TableRow TableRowSelected"]
[TD="bgcolor: transparent"]10000
[/TD]
[TD="bgcolor: transparent"]YES
[/TD]
[TD="bgcolor: transparent"]Same Formula [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]548
[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR="class: TableRow TableRowSelected"]
[TD="bgcolor: transparent"]10000
[/TD]
[TD="bgcolor: transparent"]NO
[/TD]
[TD="bgcolor: transparent"]Same Formula [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]822
[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR="class: TableRow TableRowSelected"]
[TD="bgcolor: transparent"]10000
[/TD]
[TD="bgcolor: transparent"]NO
[/TD]
[TD="bgcolor: transparent"]Same Formula[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]822
[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: Table TableWordWrap SCXW199349199, width: 0"]
<tbody>[TR="class: TableRow TableRowSelected"]
[TD="bgcolor: transparent"] 2 (number in cell G1)
[/TD]
[TD="bgcolor: transparent"]3 (number in cell H1)
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: Table TableWordWrap SCXW199349199, width: 0"]
<tbody>[TR="class: TableRow TableRowSelected"]
[TD="bgcolor: transparent"]Column A
[/TD]
[TD="bgcolor: transparent"]Column B
[/TD]
[TD="bgcolor: transparent"]Column C
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]Desired result
Column D
[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR="class: TableRow TableRowSelected"]
[TD="bgcolor: transparent"]10000
[/TD]
[TD="bgcolor: transparent"]YES
[/TD]
[TD="bgcolor: transparent"]=(B1="YES")*A1/365*10*G1+(B1="NO")*A1/365*10*H1
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]548
[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR="class: TableRow TableRowSelected"]
[TD="bgcolor: transparent"]10000
[/TD]
[TD="bgcolor: transparent"]YES
[/TD]
[TD="bgcolor: transparent"]Same Formula [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]548
[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR="class: TableRow TableRowSelected"]
[TD="bgcolor: transparent"]10000
[/TD]
[TD="bgcolor: transparent"]NO
[/TD]
[TD="bgcolor: transparent"]Same Formula [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]822
[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR="class: TableRow TableRowSelected"]
[TD="bgcolor: transparent"]10000
[/TD]
[TD="bgcolor: transparent"]NO
[/TD]
[TD="bgcolor: transparent"]Same Formula[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]822
[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
Last edited: