![]() |
Match (1 of 3 cell values) in a range?
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 |
Match (1 of 3 cell values) in a range?
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 |
Match (1 of 3 cell values) in a range?
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 |
Match (1 of 3 cell values) in a range?
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 |
All times are GMT +1. The time now is 08:00 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com