Complex formula but not sure which one to use.

tarsenul

New Member
Joined
Jan 9, 2013
Messages
16
Office Version
  1. 365
Platform
  1. Windows
I am trying to compare one cell value to 7 other cell values and populate the one that is the next highest.

For example: I want to compare B2 to all of the rest of the columns and determine which one is the next highest and return that heading.
So, the outcome on Item 1 would be "ASP" because that is the next value up.
The outcome on Item 2 would be "10% discount" because column B is higher than F but lower than E.
I hope this makes sense. I appreciate any input.
1695660670020.png
 

Attachments

  • 1695660639378.png
    1695660639378.png
    6.5 KB · Views: 1

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
How about

Code:
=INDEX(SORT(TRANSPOSE(FILTER(C2:I2,C2:I2>B2))),1)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

If you have 2021 or 365 try
Excel Formula:
=XLOOKUP(B2,C2:J2,$C$1:$J$1,,1)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

If you have 2021 or 365 try
Excel Formula:
=XLOOKUP(B2,C2:J2,$C$1:$J$1,,1)
This is it!!! Thank you and thanks for the tip on account details. I haven't used this site in a long time. :)
How about

Code:
=INDEX(SORT(TRANSPOSE(FILTER(C2:I2,C2:I2>B2))),1)
ExcelToDax - this worked but didn't pull in the name.
Fluff - this worked exactly as I was looking for.
Thank you both for your quick response and Fluff I'll be sure to check out the Account Details that you mentioned.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,076
Messages
6,122,983
Members
449,092
Latest member
Mr Hughes

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