# IF function with two logical tests

#### ksjuwka

##### New Member
I need help with creating a formula with two logical tests. I got the first one but can't figure out how to include the second logical test.

I also need to add to this formula that if M40="6%" than times 106%, if blank N40. I tried adding a second IF, using AND function but not getting what I need.

Thank You for your help!

#### Coding4Fun

##### Active Member
Maybe?

Code:
``=IF(M40=6%,IF(\$E40="S",\$N40/365*AH\$4,\$N40*U40)*1.06,N40)``

#### ksjuwka

##### New Member
Thank you, but it didn't work

Maybe?

Code:
``=IF(M40=6%,IF(\$E40="S",\$N40/365*AH\$4,\$N40*U40)*1.06,N40)``

#### ksjuwka

##### New Member
I just realized that my question is not very clear.

My formula currently: If column E=S, I want Annual Salary to be divided by total days in a year and times number of days in a month, if cell E=H I want annual salary to be multiplied by percentage in column U. This is an allocation of total wages by month. But also if Column N=6% I need to add 6% increase to this allocation. And that's where I am stuck. Thanks

#### ksjuwka

##### New Member
Thank You so much!!! I realized that my question wasn't clear and you answered what I asked. Your formula helped me to get it right.

Maybe?

Code:
``=IF(M40=6%,IF(\$E40="S",\$N40/365*AH\$4,\$N40*U40)*1.06,N40)``

Threads
1,085,838
Messages
5,386,258
Members
401,989
Latest member
romandavis