Adding an Argument to an existing IF statement HELP

cr2crf

New Member
Joined
Jun 19, 2013
Messages
29
This formula,=IF(COUNTIF(Arrays!$K$24:$K$27,F4),O$1,""), works great and I arrived at it from much help on this board. The formula looks at the array in the Arrays tab (Arrays!$K$24:$K$27) and if F4 is found there it returns what is in O1 (in this case its apples). Now I want to add another argument to the statement. I want to add the argument to look in the V column to see if "Ripe" apears, then return what is in O1. However, when I do, it returns the dreaded #VALUE ! error.

Here is what I did and it failed: =IF(COUNTIFS(V:V,"RIPE",Arrays!$K$24:$K$27,F4),O$1,""). I also tried nesting a Sumproduct in there to no avail.

Would a VLOOKUP work here? How?

I appreciate all the help for us newbies.
 

Some videos you may like

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
17,389
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
The arrays in your formula must have the same dimensions.

Try:
Code:
=IF(COUNTIFS(V24:V27,"RIPE",Arrays!$K$24:$K$27,F4),O$1,"")
 

cr2crf

New Member
Joined
Jun 19, 2013
Messages
29
The arrays in your formula must have the same dimensions.

Ugh, they don't. that seems to be my problem. The Arrays at Arrays!$K$24:$K$27 are descriptions that apply to all kinds of fruit. Only when F4 matches one of those descriptions does it return the word "apples" from O$1 to the cell with the formula.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,938
Messages
5,598,959
Members
414,269
Latest member
FJXMTT

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
Top