Cuppy
Cuppy

Reputation: 113

Getting the lowest price in Google Sheets

I have 2 sheets that are set up like this:

I've done some searching and figured that to get the values to be filled in automatically in Sheet B, a vlookup would be sufficient. However, vlookup only returns the value of the first instance of the index.

Is anyone able to guide me on how I might be able to get the lowest price from Sheet A to show on Sheet B?

Upvotes: 1

Views: 1103

Answers (3)

user11982798
user11982798

Reputation: 1908

Use Query like this:

=query(filter(SheetA!A2:B,A2:A<>""),"Select Col1, Min(Col2) Group By Col1 Label Min(Col2) ''")

or

=ifna({UNIQUE( SheetA!A2:A ), ARRAYFORMULA( vlookup( UNIQUE( SheetA!A2:A ), sort( SheetA!A2:B, 1, true, 2, true ), 2, 0 ))})

Upvotes: 0

player0
player0

Reputation: 1

you can use your VLOOKUP fx with sorted 2nd parameter:

=ARRAYFORMULA(IFNA(VLOOKUP(A1:A, SORT('Sheet A'!A:B, 2, 1), 2, 0)))

Upvotes: 1

Mousam Singh
Mousam Singh

Reputation: 755

You can use MINIFS to find minimum value for a given Item code. MINIFS, MAXIFS and SUMIFS are used to find single value from a list of values under some specific conditions. Formula would be similar to this:

= MINIFS(Sheet$1A2:Sheet$1A5, Sheet$1B2:Sheet$1B5, "=ItemCode")

Find more on this here, link

Upvotes: 1

Related Questions