# Excel Perform Calculation Based on Two Criteria Being Met

Copper Contributor

# Excel Perform Calculation Based on Two Criteria Being Met

I am trying to have excel calculate net rent across multiple years.  Cell C15 is a drop down where you can select Lease or Not Lease.  Row 21 brings back a value of Past Horizon if the column is beyond the Last Year in cell C19.  I am trying to have cell D23 calculate the net rent cost if Lease is selected in Cell C15 and Row 21 does not say Past Horizon.  If Cell C15 shows Not Lease OR row 21 shows past horizon I want to show a value of \$0.  I currently only have it set to show a value of \$0 if row 21 shows Past Horizon using this formula =IF(D21="Past Horizon",0,\$C\$29*\$C\$3) but I can't figure out how to add in the second condition for Lease or Not Lease.

3 Replies

# Re: Excel Perform Calculation Based on Two Criteria Being Met

=IF(OR(\$C\$15="Not Lease", D\$21="Past Horizon"), 0, \$C\$29*\$C\$3)

# Re: Excel Perform Calculation Based on Two Criteria Being Met

That worked, thank you very much! Is there a limit for how many conditions you can add to the IF(OR) formula?

# Re: Excel Perform Calculation Based on Two Criteria Being Met

Functions can have up to 255 arguments, so OR(...) could have up to 255 conditions!