D
D
dollar2019-01-23 21:16:28
JavaScript
dollar, 2019-01-23 21:16:28

Searching for a value in the table: 1 if found, 0 if not found. Is it possible to?

We managed to find only two functions that look up a value in an array:
1) VLOOKUP
2) MATCH
Both functions return some #N/ A value if they cannot find the value they are looking for in the table. And nothing can be done about this #N/A. How to turn it into zero?
PS I mean exact search (by coincidence), not approximate (when some closest value is selected).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Timofeev, 2016-05-25
@Vinnica

Make the class not .prod1 and .prod2, but just .prod, add the data-num attribute and fse:

$('.prod').click(function(){
var num = $(this).attr('data-num');
    $('.product-'+num).addClass('hidden');
    $('.product-md-'+num).removeClass('hidden');
});

X
xoo, 2019-01-23
@dollar

Here's an Error
Handler

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question