How to find a value based on a COLUMNS criteria

zazybang

New Member
Joined
May 6, 2018
Messages
23
Hey guys, I need a formula that will find a value based on a columns criteria. EX: I am trying to find the opposite of INDEX(x,MATCH(, as it is used for finding values based on a rows criteria.

Sheet 1

Column AColumn B

<tbody>
</tbody>
Section: Ab

<tbody>
</tbody>
Name:----ID:
XC
YE

<tbody>
</tbody>


Column CColumn D

<tbody>
</tbody>
Section: Cd

<tbody>
</tbody>
Name:----ID:
GJ
HK

<tbody>
</tbody>


Sheet 2

Column A

<tbody>
</tbody>
Name
=FORMULA ID: (J)
=FORMULA ID: (C)

<tbody>
</tbody>
I am using an Index MATCH formula to get the name in the "=FORMULA" cells, what i require is an extension to this formula that will also write what section the ID came from EX: INDEX(MATCH())&"INSERT FORMULA HERE". So what it should say in Row 3 of sheet 2 is: "G, From Section Cd". While in row 4 it should say: "C, From Section Ab.".



Thanks for any help that is provided!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
From what I can gather, you have the formula to get the name. See if this will help with the Section.

Here is my Sheet1

Excel Workbook
ABCDEFGHIJ
1Section: AbSection: Cd
2Name:----ID:Name:----ID:
3XCGJ
4YEHK
Sheet1



Formula in B2 is copied down.

Excel Workbook
AB
1IDSection
2JSection: Cd
3CSection: Ab
Sheet2
 
Upvote 0
Could you by chance break that formula down?
Look at the example for ID = "J"
(COLUMN(Sheet1!A$1:J$1)-COLUMN(Sheet1!A$1)) produces an array of (column) numbers {0,1,2,3,4,5,6,7,8,9}
Divide by True/False (1/0) depending on whether A3:J4 in Sheet1 are equal to the ID. This produces a lot of #DIV/0! errors except for the one cell that does contain "J". That cell is in the 4th column of the Sheet1 array so it will leave the 4th number (3) in the above array of column numbers.
AGGREGATE(15,6 .... ,1) finds the smallest number in an array, ignoring errors. There is only one number left in the array and that is 3.
Then INDEX retrieves the value from the 3rd cell from the row 1 range in Sheet1 (Section: Cd)
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,200
Members
449,072
Latest member
DW Draft

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