Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Wondering if it's possible to achieve the following without using OR's (i.e.
via array formula or similar) I have product information in a straight data dump from our point of sale, and a table of categories, suppliers or product groups to exclude from further reports (in a single column list). Such that: D4 = Category E4 = Supplier I4 = Product group I want a response: If the category, or the supplier, or the product group is in the list of exclusions, then response should be "DO NOT REPLENISH" I can do it easily enough with a IF(OR(MATCH(D4......) [3 match statements]),"DO NOT REPLENISH","OK") but wondering if there is a nicer/cleaner way to do it Thanks in advance. -- Cheers, RyanR |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
D4 = Category
E4 = Supplier I4 = Product group You're going to need 2 tests since your criteria are not in a contiguous range. Here's one way. Assuming the range to chack is A1:A20. All on one line. Normally entered: =IF(SUMPRODUCT(COUNTIF(A1:A20,D4:E4)) +COUNTIF(A1:A20,I4),"Do not replenish","do this") Or, this array entered version (doesn't really gain you anything but it's a couple of keystrkes shorter): =IF(SUM(COUNTIF(A1:A20,D4:E4) ,COUNTIF(A1:A20,I4)) ,"Do not replenish","do this") -- Biff Microsoft Excel MVP "RyanR" wrote in message ... Wondering if it's possible to achieve the following without using OR's (i.e. via array formula or similar) I have product information in a straight data dump from our point of sale, and a table of categories, suppliers or product groups to exclude from further reports (in a single column list). Such that: D4 = Category E4 = Supplier I4 = Product group I want a response: If the category, or the supplier, or the product group is in the list of exclusions, then response should be "DO NOT REPLENISH" I can do it easily enough with a IF(OR(MATCH(D4......) [3 match statements]),"DO NOT REPLENISH","OK") but wondering if there is a nicer/cleaner way to do it Thanks in advance. -- Cheers, RyanR |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try the below array formula; with exclusions in range J1:J5
=IF(COUNT(MATCH(D4:F4,J1:J5,0)),"DO NOT REPLENISH","OK") -- Jacob "RyanR" wrote: Wondering if it's possible to achieve the following without using OR's (i.e. via array formula or similar) I have product information in a straight data dump from our point of sale, and a table of categories, suppliers or product groups to exclude from further reports (in a single column list). Such that: D4 = Category E4 = Supplier I4 = Product group I want a response: If the category, or the supplier, or the product group is in the list of exclusions, then response should be "DO NOT REPLENISH" I can do it easily enough with a IF(OR(MATCH(D4......) [3 match statements]),"DO NOT REPLENISH","OK") but wondering if there is a nicer/cleaner way to do it Thanks in advance. -- Cheers, RyanR |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Oops..I didnt notice the reference I4..corrected version/
'array entered =IF(COUNT(MATCH(D4:F4,J1:J5,0),MATCH(I4,J1:J5,0)), "dafdas","OK") -- Jacob "Jacob Skaria" wrote: Try the below array formula; with exclusions in range J1:J5 =IF(COUNT(MATCH(D4:F4,J1:J5,0)),"DO NOT REPLENISH","OK") -- Jacob "RyanR" wrote: Wondering if it's possible to achieve the following without using OR's (i.e. via array formula or similar) I have product information in a straight data dump from our point of sale, and a table of categories, suppliers or product groups to exclude from further reports (in a single column list). Such that: D4 = Category E4 = Supplier I4 = Product group I want a response: If the category, or the supplier, or the product group is in the list of exclusions, then response should be "DO NOT REPLENISH" I can do it easily enough with a IF(OR(MATCH(D4......) [3 match statements]),"DO NOT REPLENISH","OK") but wondering if there is a nicer/cleaner way to do it Thanks in advance. -- Cheers, RyanR |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sumproduct(match range of values in 2+ cols) | Excel Worksheet Functions | |||
Match values and create a list in one cell | Excel Discussion (Misc queries) | |||
Validation - Ensure Cell values match | Excel Discussion (Misc queries) | |||
count if range contains match to another cell | Excel Discussion (Misc queries) |