# Formula to return the lowest value in differents tables

1. ## Formula to return the lowest value in differents tables

Hi !

I need to create a formula and I'm not sure which function would be best for that.

Basically I have different tables with the same products, with prices and other data (they are different suppliers).

Now I would like to have a formula that will check for the lowest price (a column) for a specific product (a column as well, all the different tables have the same values in this column) in all the different tables and return a value (maybe the name of the table, but the lowest price itself might be quite easier).

Which function would be best for this ?

Thanks !  Register To Reply

2. ## Re: Formula to return the lowest value in differents tables

How many tables are we talking about?

I propose something like this:

=MIN(INDEX(TABLE1,MATCH(PRODUCT,TABLE1)),INDEX(TABLE2,MATCH(PRODUCT,TABLE2)))

See attached example (using named ranges)  Register To Reply

3. ## Re: Formula to return the lowest value in differents tables

We are talking about 15 tables >.<

It works but the products are not in all the different tables and the formula fails when a product is missing in the listed tables...

This idea is more complex that I though !  Register To Reply

4. ## Re: Formula to return the lowest value in differents tables

Try this on the sample table posted by "eibi"

=MIN(IFERROR(INDEX(Table1_Price,MATCH(Target_Product,Table1_Product,0)),10^6),IFERROR(INDEX(Table2_Price,MATCH(Target_Product,Table2_Product,0)),10^6),IFERROR(INDEX(Table3_Price,MATCH(Target_Product,Table3_Product,0)),10^6))

but 15 tables could prove a challenge!

Is there a possibility of equal prices?

A sample file would help.  Register To Reply

5. ## Re: Formula to return the lowest value in differents tables

Chances of equal prices are very low and it's not really a concern anyway.

Your proposition works John !! But it's indeed making the formula quite huge (5 lines).

However I'm getting #VALUE! in some row for some reason...

And I wonder if I want to bother with VBA :P  Register To Reply

6. ## Re: Formula to return the lowest value in differents tables

I found the problem of the #VALUE!  Register To Reply