1

I want to search a range for the lowest price of an item in a row and return that price as well as the store (header). Ideally, this would be an ARRAYFORMULA as the list will be probably grow constantly.

I've tried a combination of VLOOKUP and MATCH, but just can't seem to get it to all come together.

enter image description here

Here's a link to my sheet.

1 Answer 1

2

try:

=ARRAYFORMULA(QUERY(TRANSPOSE(QUERY(TRANSPOSE(A2:G), "select "&TEXTJOIN(",", 1, IF(LEN(A2:A), "min(Col"&ROW(A2:A)-ROW(A2)+1&")", ))&"")), "select Col2")) 

enter image description here

and headers:

=ARRAYFORMULA(IFNA(VLOOKUP(I2:I, SPLIT(TRANSPOSE(SPLIT( QUERY(TRANSPOSE(QUERY(TRANSPOSE(IF(B2:D="",,"♠"&B2:D&"♦"&B1:D1)) ,,99^99)),,99^99), "♠")), "♦"), 2, 0))) 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.