Formula to return store name with highest sales (subject to restrictions)

JamesonMH

Board Regular
Joined
Apr 17, 2018
Messages
120
Office Version
  1. 365
Platform
  1. Windows
Hi there,

To simplify, I have 4 stores and I want to return the store name with the highest sales*. But I want to exclude store names with a numbered suffix (i.e. only store names that end with a letter suffix should be included). So in the table below, I'd want the formula to return Store C, since Store 6 doesn't meet my requirement of ending with a letter suffix.

[TABLE="width: 500"]
<tbody>[TR]
[TD]Store [/TD]
[TD]Sales[/TD]
[/TR]
[TR]
[TD]Store A[/TD]
[TD]$50,000[/TD]
[/TR]
[TR]
[TD]Store B[/TD]
[TD]29,000[/TD]
[/TR]
[TR]
[TD]Store C[/TD]
[TD]72,000[/TD]
[/TR]
[TR]
[TD]Store 6[/TD]
[TD]81,000[/TD]
[/TR]
</tbody>[/TABLE]

I tried INDEX/MATCH/MAX variations to no avail. I don't want to rely on filtering or any VBA - a formula is desired here. Excel 2013.

Many thanks.

James
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Book1
ABCD
1StoreSaleshighest sales
2Store A50,000Store C
3Store B29,000Store F
4Store C72,000
5Store 681,000
6Store F72,000
7Store 10072,000
Sheet1

In D2 control+shift+enter, not just enter, and copy down:

=IFERROR(INDEX($A$2:$A$7,SMALL(IF(1-ISNUMBER(RIGHT($A$2:$A$7)+0),IF($B$2:$B$7=MAX(IF(1-ISNUMBER(RIGHT($A$2:$A$7)+0),$B$2:$B$7)),ROW($A$2:$A$7)-ROW($A$2)+1)),ROWS($D$2:D2))),"")
 
Upvote 0
Thanks very much Aladin, it works.

It's quite the formula, I definitely wouldn't have gotten there on my own!
 
Upvote 0
Thanks sheetspread. I used your suggestion to make an array formula that incorporated the above. I appreciate your help!
 
Upvote 0

Forum statistics

Threads
1,223,991
Messages
6,175,820
Members
452,672
Latest member
missbanana

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