if value is >= x it should return Major in 1st row All in 2nd row if <= x it should return All

sudarsan23

New Member
Joined
Apr 17, 2021
Messages
1
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
Good Morning friends ,

I tried index match , index small if
I tried many ways to get the desired but I failed

I have attached my work sheet please help
major all.xlsx
ABCDEFG
1RegionPositionRegion 
2AnantapurMajorAnantapurMajor#N/A
3AnantapurAllAnantapurMajor#VALUE!
4ChittoorMajorAnantapurMajor#VALUE!
5ChittoorAllAnantapur1#N/A#VALUE!
6East GodavariMajorAnantapurMajor#VALUE!
7East GodavariallAnantapurMajor#VALUE!
8KrishnaMajorAnantapurMajor#VALUE!
9KrishnaMajorChittoorMajor#VALUE!
10KurnoolMajorChittoor#VALUE!
11KurnoolallChittoor#VALUE!
12NelloreMajorChittoor#VALUE!
13NelloreallChittoor#VALUE!
14PrakasamMajorChittoor
15PrakasamallChittoor
16SrikakulamMajorChittoor
17SrikakulamallChittoor
18KurnoolallEast Godavari
19NelloreMajorEast Godavari
20NelloreallEast Godavari
21PrakasamMajorEast Godavari
22PrakasamallGuntur
23SrikakulamMajorGuntur
24SrikakulamallGuntur
Sheet1
Cell Formulas
RangeFormula
F1F1=IFERROR(INDEX($B$3:$B$9, SMALL(IF(E$2=$A$3:$A$9, ROW($B$3:$B$9)-2,""), ROW()-2)),"")
F2:F9F2=INDEX($B$2:$B$24,MATCH(E2,$A$2:$A$23,0))
G2G2=INDEX($B$2:$B$24, SMALL(IF($A$2:$A$24=$E2,ROW($E$2:$E$31)-MIN(ROW($E$2:$E$31))+1, ""), COUNTIF(A$1:$A1, A1)))
G3:G13G3=INDEX($B$2:$B$24, SMALL(IF($A$2:$A$24=$E$1:$E$31*2, ROW($E$1:$E$31)-MIN(ROW($E$1:$E$31))+1, ""), COUNTIF(A$1:$A2, A2)))
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: How to get two different names with same value
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,214,383
Messages
6,119,196
Members
448,874
Latest member
Lancelots

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