Need help: cell should switch to "Y" when A1 matches with column K, to "N" when not

Brecht

Member
Joined
Sep 15, 2014
Messages
36
Reaction score
0
Points
6
Location
Netherlands
Excel Version(s)
Version 2007
Need help: cell should switch to "Y" when A1 matches with column K, to "N" when not

Hi,

I am working on an excelsheet that, via the import-function of our webshop, automatically hides the items on our webshop that are not in stock with our supplier. I would combine our own export of products (columns A-I) with their product listings (one for not in stock (columns K-T), and one for in stock (columns V-AE).

Now what I am searching for is a formula that does the following:
If the data in cell G1*, occurs exactly the same somewhere in column K,** cell I1 should switch to "Y". If the data in cell G1 occurs somewhere in column V,*** cell I1 should switch to "N".

* which is the article code corresponding with the code of our supplier
** which lists the article codes which are not available at our supplier.
*** which lists the article codes which are available at our supplier.

***

Or, what would probably work as well, if I only add one of the product listings.
In that case, the formula would need to say:
If the data in cell G1, occurs exactly the same somewhere in column K, cell I1 should switch to "Y". If it doesn't occur in column K, cell I1 should switch to "N".

Your help would be much appreciated!
 
Try this in Cell G1:

=IF(COUNTIF( K:K,G1)>0, "Y", IF(COUNTIF(V:V,G1)>0, "N",""))

This includes all of columns K and V. You made need to use precise ranges to fit your stock list if these columns have other unrelated data in them.
 
Try this in Cell G1:

=IF(COUNTIF( K:K,G1)>0, "Y", IF(COUNTIF(V:V,G1)>0, "N",""))

This includes all of columns K and V. You made need to use precise ranges to fit your stock list if these columns have other unrelated data in them.

Sorry - I should have said enter the formula in I1 , not G1.
 
Last edited:
Back
Top