IF ...only it would work

D

Digory

Dear All,
Great forum - hope someone can help with this.

I have data in same workbook, different sheet arranged in cols wit
assigned NAMES to ranges.

For example; range PROD is a list of product documentation:
product1101_dispatched
product1101_invoice
product1102_dispatched
product1102_invoice

Range OLD is a list of deleted products:
product1000
product1000
product1001
product1000

I am trying to build a matrix where cells will first interogate OLD an
if there is an entry return a D (for deleted). If no entry in OLD the
interogate PROD and count the number of entries using productNumber* t
count all the product documents associated with that product. Assumptio
is that products will appear in only one range or not at all. I wil
then conditional format matrix with traffic light red=0
orange=D,Green>0.

Am trying to use this (for prod1101):
{=IF(OLD="product1001","D",COUNTIF(PROD,"=product1101*"))}

Where am I going wrong ?

D:-
 
M

Max

Try:

=IF(ISNUMBER(MATCH("product1001",OLD,0)),"D",
COUNTIF(PROD,"product1101*"))

Not sure whether there was a typo in the post as to: "product1101"
(Should the 2 product references be the same?)
 
B

Biff

Hi!

Try this: (normally entered, not an array)

=IF(ISNUMBER(MATCH("product1001",old,0)),"D",COUNTIF(prod,"product1101*"))

Are you sure the criteria are correct? product1001, product1101

Also, you'd be better off using cells to hold the criteria:

A1 = product1001
B1 = product1101

Then:

=IF(ISNUMBER(MATCH(A1,old,0)),"D",COUNTIF(prod,B1&"*"))

Biff
 
D

Digory

Guys,

Thanks - that's excellent (& oops there was a typo in question)

The tip to use cells to hold the criteria has saved me heaps of
effort.
I had tried this but failed and resorted to using a generic formula and
then find / replace to make specific for each cell.

Ta muchly
D:)
 
Top