Querying range of cells for value

cypherja

New Member
Joined
Nov 4, 2016
Messages
2
I'm trying to write a formula that will look at a range of cells to see if any of them match a value, if so, I want to capture a value for that.

I put together some sample data below. What I want to do is to have the script in E1 look at all of the values in cells A5 to C9...if any of those cells contain the same value as A1, I want to show the value of the corresponding number's column heading (contained in row 3).

So, in the example below, the formula should return a result of "Thousands". The only result I can get, however, is "#Value!"

I'm copying this formula from another excel document where it works, so I'm not sure what the issue is.


ABCDE
13000=INDEX(A3:C3,MAX(IF(A5:C9=A1,COLUMN(A5:C9))))
2
3HundredsThousandsTens of Thousands
4
5100100010000
6200200020000
7300300030000
8400400040000
9500500050000

<tbody>
</tbody>
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
You need to commit the formula to the cell with CNTL-SHIFT-ENTER not just ENTER.
 
Upvote 0

Forum statistics

Threads
1,215,514
Messages
6,125,265
Members
449,219
Latest member
daynle

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