Reverse Index/Match?

mhenk

Well-known Member
Joined
Jun 13, 2005
Messages
591
Hey all:

I've got a chess board in B2:I9, and would like a function that returns the location of a particular piece.

Say I have Q1 in cell B9, I'd like to return A-1

B1:I1 = A ---> H
A2:A9 = 8 ---> 1

Any help?
 
Hi Jobowo

Thanks for testing my formula. Any error you find will be an opportunity to improve it.

I could not, however, reproduce the error. This is what I've done:

I started with my solution in Post#3. The data table is in A1:I9 and the results table in K2:L6.

I then followed the steps you mentioned in your post, first:

... moving the array down and right using insert rows/columns ...

I inserted 3 rows before row 1.

The data table is now in A4:I12 and the results table in K5:L9.

I inserted 2 columns before column A.

The data table is now in C4:K12 and the results table in M5:N9.

... and then moving it back using range selection and drag-and-drop

I selected the source data table in C4:K12 and moved it back to A1:I9

I selected the results data table in M5:N9 and moved it back to K2:L6

After each step all the results held.

I could not make the formulas fail as a result of a change in location of the data. I tried several Insert/Delete Rows/Columns and also selecting the tables and moving them around and could not find any problem with the formulas.

I'd be thankful if you'd post the exact steps of your test, with the errors you get, so that I can study this issue.
 
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I have discredited you unfairly pgc01. I was testing this morning and seeing all manner of strange things. It was just as I was folding up that I noticed your own formula had crashed and assumed the worst. But when I just re-opened the workbook it turned out that it had crashed only because in my last test, I had mistakenly deleted the K3; the resulting #REF caused the crash, not a fault in the formula. Apologies for sending you on a wild goose chase.

Furthermore your formula does remain robust, even though the drag-copy and insert/delete do result in different adjustments to (and subsequent errors in) array constructions by Excel that I have adopted from examples provided by other learned folk on this board.

However, this time I want to be more sure of my findings before I post anything further on this!
 
Upvote 0
I'm glad the formula works fine. If, however, in your future tests you find an error, please post it.

Cheers.
 
Upvote 0
sorry I was referring to this formula =INDEX($A$1:$I$1,MIN(IF($B$2:$I$9=$B$12,COLUMN($B$2:$I$9))))&"-"&INDEX($A$1:$A$9,MIN(IF($B$2:$I$9=$B$12,ROW($B$2:$I$9))))
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,352
Members
449,080
Latest member
Armadillos

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