Find corresponding column based off lowest number in a different column

japow

New Member
Joined
Oct 6, 2022
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,

I'm aiming for a formula to split out the minimum option based off numerous conditions; although instead of returning the numerical value I want to know the corresponding value in a text based column.

I'm thinking a combination of index/match/min/arrayformula/xlookup is required.

I've created a table below to help articulate what I'm after. I have a data source table, and need the formula to be separate.

Date source:
ProductCountrySupplierPrice
ABCChinaXMC Industries$5
ABCChinaShanghai INT$2
ABCSingaporeCAB INT$15
ABDSingaporeLAB Tech$4.5
ABDSingaporeCAB INT$6
ABDChinaXMC Industries$15

Table with incomplete formula:
ProductSingaporeChina
ABCCAB INTFORMULA HERE TO FIND THE LOWEST PRICE SUPPLIER FOR ABC
ABDLAB TechFORMULA HERE TO FIND THE LOWEST PRICE SUPPLIER FOR ABD

I hope this isn't sacrilege but I use Google Sheets as much as Excel so some formulas like aggregate won't work for me. Would really appreciate any help!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Welcome to the MrExcel board!

I use Google Sheets as much as Excel so some formulas like aggregate won't work for me.
I don't know about Google sheets, but for excel you could try this (allows for if multiple suppliers have equal lowest price)

22 10 06.xlsm
ABCDEFGH
1ProductCountrySupplierPrice($)ProductSingaporeChina
2ABCChinaXMC Industries5ABCCAB INTShanghai INT
3ABCChinaShanghai INT2ABDLAB Tech, XXXXMC Industries
4ABCSingaporeCAB INT15
5ABDSingaporeLAB Tech4.5
6ABDSingaporeCAB INT6
7ABDChinaXMC Industries15
8ABDSingaporeXXX4.5
Lowest
Cell Formulas
RangeFormula
G2:H3G2=LET(f,SORT(FILTER($C$2:$D$8,($A$2:$A$8=$F2)*($B$2:$B$8=G$1)),2),TEXTJOIN(", ",,FILTER(INDEX(f,0,1),INDEX(f,0,2)=INDEX(f,1,2))))
 
Upvote 0
Ahh thanks for your help Peter, this is great for Excel, but sadly '=LET' does not work for Google Sheets. Appreciate your help nonetheless. It's my fault for posting here after all.
Would be great if you could still keep this open as I do believe it's possible with a formula that works in Sheets.
 
Upvote 0
sadly '=LET' does not work for Google Sheets.
If that is the only problem, then you could try the 'full' version of the same formula.

BTW, if you are only looking for Google Sheets solutions, then your question should be asked, not in the Excel Questions forum but in the General Discussions and Other Applications forum.
Please keep that in mind for the future.
1665051278462.png


22 10 06.xlsm
ABCDEFGH
1ProductCountrySupplierPrice($)ProductSingaporeChina
2ABCChinaXMC Industries5ABCCAB INTShanghai INT
3ABCChinaShanghai INT2ABDLAB Tech, XXXXMC Industries
4ABCSingaporeCAB INT15
5ABDSingaporeLAB Tech4.5
6ABDSingaporeCAB INT6
7ABDChinaXMC Industries15
8ABDSingaporeXXX4.5
Lowest (2)
Cell Formulas
RangeFormula
G2:H3G2=TEXTJOIN(", ",,FILTER(INDEX(SORT(FILTER($C$2:$D$8,($A$2:$A$8=$F2)*($B$2:$B$8=G$1)),2),0,1),INDEX(SORT(FILTER($C$2:$D$8,($A$2:$A$8=$F2)*($B$2:$B$8=G$1)),2),0,2)=INDEX(SORT(FILTER($C$2:$D$8,($A$2:$A$8=$F2)*($B$2:$B$8=G$1)),2),1,2)))
 
Upvote 0
.. Another possibility

22 10 06.xlsm
ABCDEFGH
1ProductCountrySupplierPrice($)ProductSingaporeChina
2ABCChinaXMC Industries5ABCCAB INTShanghai INT
3ABCChinaShanghai INT2ABDLAB Tech, XXXXMC Industries
4ABCSingaporeCAB INT15
5ABDSingaporeLAB Tech4.5
6ABDSingaporeCAB INT6
7ABDChinaXMC Industries15
8ABDSingaporeXXX4.5
Lowest (3)
Cell Formulas
RangeFormula
G2:H3G2=TEXTJOIN(", ",1,IF($A$2:$A$8=$F2,IF($B$2:$B$8=G$1,IF($D$2:$D$8=MINIFS($D$2:$D$8,$A$2:$A$8,$F2,$B$2:$B$8,G$1),$C$2:$C$8,""),""),""))
 
Upvote 0
Ah thanks Peter, i'll keep that in mind next time. Appreciate all the help, sadly Google Sheets is not up for this!
 
Upvote 0
I have moved the thread to the correct forum for Google Sheets questions.

sadly Google Sheets is not up for this!
What about this in G2?
=ArrayFormula(TEXTJOIN(", ",1,IF($A$2:$A$8=$F2,IF($B$2:$B$8=G$1,IF($D$2:$D$8=MINIFS($D$2:$D$8,$A$2:$A$8,$F2,$B$2:$B$8,G$1),$C$2:$C$8,""),""),"")))
 
Upvote 0
Solution
Thanks.

Sadly that didn't work either. You can view it in Google Sheets here. I believe it might have to be a index(match(min type formula required.
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,114
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top