Is it Hlookup, Match function or something else?

Anjt87

New Member
Joined
Mar 6, 2014
Messages
9
Hi guys,
I have a spreadsheet exported from from Access, where I have a "False" or "True" cell values which relate to a Country name (If Destination is Costa Rica it's "True"). Now I'm trying to create a formula which would work, if Value is "True" in a range of cells (C4:AG4), then give a Name of the country which can be found in (C3:AG3 or should it be C5:AG5? as lookups don't work if table array is under range lookup).
How do I do approach it?
pkrmKmo.jpg
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Welcome to the board.

It's difficult to tell exactly, because the picture conflicts with your description.

But anyway, you can use Index and Match

=INDEX(C$1:AG$1,MATCH(TRUE,C4:AG4,0))

That will return the value (country name) from Row 1, based on where the TRUE is found in Row 4.
 
Upvote 0
A bit different scenario. If there is more than one country to show because there is more than one "TRUE" value (as the product is multi-destination) is it possible to show all results in one cell?
Cheers
 
Upvote 0
In that case, I would transpose the data, then you can use autofilter on each product to search for TRUE's

Highlight and copy the entire range
Go to a new blank sheet, and select A1
Then Right Click - Paste Special - Transpose.

Now you have the products listed accross row 1, whit the countries listed down the column
And you can apply the Autofilter, to filter on a specific product to show all the TRUE's.
 
Upvote 0
That would work if only I wouldn't have over 1000 products :eek:. Is there less manual way?
 
Upvote 0

Forum statistics

Threads
1,215,771
Messages
6,126,799
Members
449,337
Latest member
BBV123

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