Return value from column 1 if...

Fazila

Board Regular
Joined
Nov 19, 2014
Messages
163
Not sure what formula to use. Currently I am using index match but whilst it is returning a result it is not quite returning what I want.

I have a table which contains the following info:

StaffReg 1Reg 2Reg 3Reg 4
AAB7.1/Rg
SAH7LA/Rg7LB/RG7.1/Rg
MAH9.7/Rg9BW/RG9BT/RG
AJA10W/Rg10H/Rg10M/RG

<tbody>
</tbody>

and so forth

What I need is a formula that matches a value say 7.1/Rg and returns the value from column A wherever reference is made to 7.1/Rg i.e. in this instance AAB and SAH to another sheet.

Any ideas?

Thanks

Fazila
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Hello,

With cell F2 = 7.1/Rg

you could test in cell G2 the following Array Formula :

Code:
=IFERROR(INDIRECT("A"&SMALL(IF($A$1:$E$5=$F$2,ROW($A$1:$E$5)),ROWS($A$2:A2))),"")

and copy it down ...

Hope this will help
 
Upvote 0
Let A1:E5 of Sheet1 house the data, including the headers.

Let A1 of Sheet2 house 7.1/Rg, the value to look for.

In A3 of Sheet2 control+shift+enter, not just enter, and copy down:

=IFERROR(INDEX(Sheet1!$A$2:$A$5,SMALL(IF(FREQUENCY(IF(Sheet1!$A$2:$A$5<>"",IF(Sheet1!$B$2:$E$5=$A$1,MATCH(Sheet1!$A$2:$A$5,Sheet1!$A$2:$A$5,0))),ROW(Sheet1!$A$2:$A$5)-ROW(Sheet1!$A$2)+1),ROW(Sheet1!$A$2:$A$5)-ROW(Sheet1!$A$2)+1),ROWS($A$3:A3))),"")
 
Upvote 0
Thanks for posting James but couldn't make it work possibly was entering the formula wrong as my data is in two sheets?
 
Upvote 0
sorry hit a snag it is returning the first value it comes across not all of them i.e. for 7.2/Rg it is returning a value NBR when I need it to return NBR and RBM.

Thanks
 
Upvote 0
sorry hit a snag it is returning the first value it comes across not all of them i.e. for 7.2/Rg it is returning a value NBR when I need it to return NBR and RBM.

Thanks

Are you addressing the proposal of post #3 ? By the way, there is no 7.2/Rg in the input data.
 
Upvote 0
Thanks for posting James but couldn't make it work possibly was entering the formula wrong as my data is in two sheets?

You are right ...

As you see it from the formula structure ...the formula posted is not designed for two sheets ...
 
Upvote 0

Forum statistics

Threads
1,215,743
Messages
6,126,615
Members
449,322
Latest member
Ricardo Souza

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