Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sumproduct(match range of values in 2+ cols) LisaM Excel Worksheet Functions 15 September 4th 09 06:19 AM
Match values and create a list in one cell notso Excel Discussion (Misc queries) 5 February 5th 07 02:51 AM
Validation - Ensure Cell values match bluesifi Excel Discussion (Misc queries) 2 September 6th 06 10:00 AM
count if range contains match to another cell creativeops Excel Discussion (Misc queries) 7 February 23rd 06 06:22 PM


All times are GMT +1. The time now is 09:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"