Formula to find cell reference when row/column not known

Factotum

Board Regular
Joined
May 14, 2015
Messages
118
Could someone help me with a formula (not VBA) to lookup a value in another sheet and return the cell reference? The catch is that I don't know the row or column where the search value will be found. I've tried Find and Index, but either they don't work or I don't understand them.

I have an organization chart (see Employee Chart table below) that shows our company hierarchy. The other tab is a list of the same names, just in columns so that I can more easily analyze and compare to other sheets.

On the List worksheet, I would like a formula in Column A to look at the Chart worksheet, range A1:Z100, and tell me what cell the Employee ID is in.
ABC
1Location in Chart worksheetEmployee IDEmployee Name
2B4123456Bill
3E4789101Ted
4B8454545Rufus

<tbody>
</tbody>


Here's an example of the Employee Chart worksheet
ABCDE
1NameIDNameID
2
3Finance DeptHR Department
4Bill123456Ted789101
5
6
7Planning Dept.
8Rufus454545

<tbody>
</tbody>

Thanks for any suggestions!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
If you're happy using lots of helper columns, the below will work (copy the formulae in column E as far as column AD
Excel Workbook
ABCDE
1LocationIDName1
2B4123456Bill40
3E4789101Ted40
4B8454545Rufus80
List
 
Upvote 0
ARRAY formula in A2 then drag down. ARRAY formula should be confirmed with Ctrl+Shift+Enter keys together not with Enter key alone.
Code:
=CHAR(64+SMALL(IF(ISNUMBER(FIND($C2,'Employee Chart'!$A$2:$E$8)),COLUMN('Employee Chart'!$A$2:$E$8),""),1))&SMALL(IF(ISNUMBER(FIND($C2,'Employee Chart'!$A$2:$E$8)),ROW('Employee Chart'!$A$2:$E$8),""),1)
This formula works If column lies From A to Z.
 
Last edited:
Upvote 0
Thanks kvsrinivasamurthy! I don't completely understand the formula you gave me, but it works beautifully. There's one additional thing I found that I'm trying to add in, but I can't find the right spot for it. I've been trying to add in an Offset(0,2) to your original formula. Maybe that's not possible, but it would be helpful. Thanks!
 
Upvote 0
Thanks kvsrinivasamurthy! I don't completely understand the formula you gave me, but it works beautifully. There's one additional thing I found that I'm trying to add in, but I can't find the right spot for it. I've been trying to add in an Offset(0,2) to your original formula. Maybe that's not possible, but it would be helpful. Thanks!
What is being offset... the $C2? If so, try changing both $C2 references to $E2.
 
Upvote 0
Since ID's are unique and no employee works in more than one department...

In A4 of List control+shift+enter, not just enter:

=ADDRESS(MIN(IF('Employee Chart'!$A$2:$E$8=$B2,ROW('Employee Chart'!$A$2:$E$8))),MIN(IF('Employee Chart'!$A$2:$E$8=$B2,COLUMN('Employee Chart'!$A$2:$E$8))),4)
 
Upvote 0
Rick - I'm not sure I phrased my initial question very well. The employee name will not always be consistent between sources, making it difficult to use Vlookups to other documents. For that reason, I was hoping to find the Employee ID in the Chart and return the location of the Employee Name. Hence the offset to find the location one cell to the right of the Employee ID (my earlier response incorrectly showed a (0,2) offset).

kvsrinivasamurthy - Hopefully the above answers your question also. As to the Offset function, it is an available function: =OFFSET(reference, rows, cols, [height], [width]) I've never really used it and I haven't ever used the height/width arguments.

Aladin - it appears that your solution works just like I need it to.


Thank you all for your help and input - it is very much appreciated!
 
Upvote 0

Forum statistics

Threads
1,214,392
Messages
6,119,254
Members
448,879
Latest member
oksanana

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