How to combine two formulas into one?

honkin

Active Member
Joined
Mar 20, 2012
Messages
385
Office Version
  1. 2016
Platform
  1. MacOS
I have 2 separate lines of code which both work fine, but I need to have them work together.

Here is the first line:
Code:
=IF(F19="","",IF(F19<3.5,L18*0.01,IF(F19<7.45,L18*0.006,IF(F19<11.1,L18*0.004,"0"))))

Here is the second line of code:

Code:
=IF(F19="","",IF(F19<3.5,$M$18*0.01,IF(F19<7.45,$M$18*0.006,IF(F19<11.1,$M$18*0.004,"0"))))

I need them each to be used depending on this criteria - IF L19>$M$18 I want the first formula used, but IF L19<=$M$18, I want the second formula used.

Writing each line separately wasn't such an issue, but for the life of me, I always get lost trying to combine a couple of functions like this.

Here is what I tried, but Excel tells me there are too many arguments

Code:
=IF(L19>$M$18,IF(F19="","",IF(F19<3.5,L18*0.01,IF(F19<7.45,L18*0.006,IF(F19<11.1,L18*0.004,"0",IF(L19<=$M$18,IF(F19="","",IF(F19<3.5,$M$18*0.01,IF(F19<7.45,$M$18*0.006,IF(F19<11.1,$M$18*0.004,"0"))))))))))

Any thoughts how to have it work as described above?

cheers
 
a typo only.
Sorry, just trying to understand. Which post had the typo and what was the typo and correction?

Can you confirm what your final working formula is please?
 
Upvote 0

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
The original question was correct and was unanswered. I found the correct formula and posted it back here in case it helped anyone else

It is good to hear that you were able to fix the typo in your formula and got the result you need.

However, the solution that solved your problem doesn't match with the original question.

The answers to the original question, including the original typo and answered accordingly, provided in post#2 and post#5 as was also explained by @jtakw. Although @Peter_SSs's solution is a beautiful approach providing the boolean logic usage in an Excel formula as well as demonstrating how LOOKUP function could be used to shorten a long formula that contains nested conditionals, the original question has been answered by @diddi exactly as requested.

Therefore, the marked solution has been switched that will help future readers who will read the original question.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,307
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top