Multiple IF statements and separate formulas

Figero21

New Member
Joined
Jan 10, 2018
Messages
11
I am trying to build a formula that will verify a word in the first section and in another section, however if the word was to change the. It will produce a separate result. I have been able to complete it for one result but once I try and build upon it the formula no longer works. It says I have too many arguments.

=IF(COUNT(SEARCH({"5M"},I4)),IF(COUNT(SEARCH({"Actual"},AI4)),IF(AND(S4>Sheet3!C$19,S4<Sheet3!D$19),"Pass","Fail")),IF(COUNT(SEARCH({"5M"},I4)),IF(COUNT(SEARCH({"False load"},AI4)),IF(AND(S4>Sheet3!E$19,S4<Sheet3!F$19),"Pass","Fail"))),IF(COUNT(SEARCH({"7M"},I4)),IF(COUNT(SEARCH({"Actual"},AI4)),IF(AND(S4>Sheet3!C$20,S4<Sheet3!D$20),"Pass","Fail")),IF(COUNT(SEARCH({"7M"},I4)),IF(COUNT(SEARCH({"False load"},AI4)),IF(AND(S4>Sheet3!E$20,S4<Sheet3!F$20),"Pass","Fail")))))
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
I think your forum post is trying to turn your formula into HTML. Can you put a space after what I assume is an "<" after the S4?
 
Upvote 0
Here is the formula again

=IF(COUNT(SEARCH({"5M"},I4)),IF(COUNT(SEARCH({"Actual"},AI4)),IF(AND(S4 > Sheet3!C$19,S4 < Sheet3!D$19),"Pass","Fail")),IF(COUNT(SEARCH({"5M"},I4)),IF(COUNT(SEARCH({"False load"},AI4)),IF(AND(S4 > Sheet3!C$19,S4 < Sheet3!D$19),"Pass","Fail"))))

I am getting a False message instead of getting a pass fail. or if I make some changes then I am getting a to many arguments
 
Upvote 0
Figero21, Good evening.

Try to use:

=IF(AND(COUNT(SEARCH("5M",I4)),COUNT(SEARCH({"Actual","False Load"},A14)), S4 > Sheet3!C$19, S4 < Sheet3!D$19),"Pass","Fail")
<sheet3!d$19),"pass","fail")
<sheet3!d$19),"pass","fail")

Please, tell us if it worked as you desired.

I hope it helps.</sheet3!d$19),"pass","fail")
</sheet3!d$19),"pass","fail")
 
Upvote 0
<sheet3!d$19),"pass","fail")
That didn't work unfortunately. When you change the search to find "False load" instead of "Actual" the search criteria also changes. I need it to find data in E$19 and F$19 if it is "false load" and c$19 and D$19 if it is "actual"
I K M O Q S U W
Meter SizeFixed FactorDifferentialMeter LocFlow SecondsFlowratePass/Fail CCFMeter ReadingMeter CCFPressureOriginal Fixed FactorHighLowFalse Load / Actual LoadReg Type
5MYesOut Right41878Pass74568101.221.191.34591.0341ActualInsert Equation301

<tbody>
</tbody>
</sheet3!d$19),"pass","fail")


Sheet 3

ABCDEF
5M1040045004001000

<tbody>
</tbody>


<tbody>
</tbody>

=IF(AND(COUNT(SEARCH("5M",I4)),COUNT(SEARCH({"Actual","False Load"},AI4)), S4>Sheet3!C$19, S4<sheet3!d$19),"pass","fail")< html=""></sheet3!d$19),"pass","fail")<>
 
Upvote 0
Sorry full formula didn't save with last post.

=IF(AND(COUNT(SEARCH("5M",I4)),COUNT(SEARCH({"Actual","False Load"},AI4)), S4>Sheet3!C$19, S4<Sheet3!D$19),"Pass","Fail")
 
Upvote 0
Figero21, Good evening.

My suggested formula was built based on your original formula.

Since you have now changed the search range, you need a new logic and a new formula.

Try to use:


=IF(COUNT(SEARCH("5M",I4)),IF(OR(AND(COUNT(SEARCH("Actual",AI4)),S4 > Sheet3!C$19,S4 < Sheet3!D$19), AND(COUNT(SEARCH("False load",AI4)),S4 > Sheet3!E$19, S4 < Sheet3!F$19)),"Pass","Fail"), "")

Please, tell us if it worked for you now.
I hope it helps.
 
Upvote 0
Marcílio_Lobão,

=IF(COUNT(SEARCH("5M",I4)),IF(OR(AND(COUNT(SEARCH("Actual",AI4)),S4 > Sheet3!C$19,S4 < Sheet3!D$19), AND(COUNT(SEARCH("False load",AI4)),S4 > Sheet3!E$19, S4 < Sheet3!F$19)),"Pass","Fail"), "")

Thanks, That formula worked amazing. I had one other problem with the formula. How could I duplicate this formula so that if I were to also change the word from 5M to 11M it would change the selection also? I need all of this info to be added to the same cell.

Thanks
 
Upvote 0
Marcílio_Lobão,


My additional problem is that the first word search has several different changes that need to change and take effect also. I have a total of 23 different words to put into that section. Each one had a different factor to it which changes the end amount. As long as I can change the 5M to 11M or 7M or 750 ect then it should change for the rest. When I try and duplicate it in the same cell it isn't working.

Thanks.
 
Upvote 0
Figero21, Good morning.

It seems that your need is much greater than you are passing to us gradually.

To facilitate our help to you, save your file on a free website, www.sendspace.com and place the download link here.

Manually put some answers there as you would like them to appear.

Seeing the total of the work we will be able to offer you a faster and conclusive help.

Help us to help you.
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,607
Members
449,090
Latest member
vivek chauhan

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