Find text based on column number

loverfellow

Board Regular
Joined
Mar 4, 2008
Messages
116
I am actually using vlookup function. Here is formula:
=+VLOOKUP(B10,'Selected (2)'!B8:IV56,3,0)

Now, for column number, I want to search some particular text in a row and if the text matches, then i want the result to be column number so that my vlookup function can work properly.

I am in a little bit hurry, because my meeting is coming ahead. So, I would be obliged if someone could answer this.
 

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.

Colin Legg

MrExcel MVP
Joined
Feb 28, 2008
Messages
3,497
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
One general approach would be this:

Code:
=INDEX('Selected (2)'!B8:IV56,
    MATCH(B10,'Selected (2)'!B8:B56,0),
    MATCH(B11,'Selected (2)'!B8:IV8,0))

Where
B10 contains the text for the Row you want to lookup
B11 contains the text for the Column you want to lookup

'Selected (2)'!B8:IV56 is the entire lookup table including headers
'Selected (2)'!B8:B56 is the first row of the lookup table
'Selected (2)'!B8:IV8 is the first column of the lookup table
 
Upvote 0

loverfellow

Board Regular
Joined
Mar 4, 2008
Messages
116
Thanks for quick reply.
Sorry, I didn't get it. I will be more specific.
=+VLOOKUP(B10,'Selected (2)'!B8:IV56,3,0)

Now, for column number, I want to search text "1A3" from this range "'Selected (2)'!C8:IH8", and I want the result to be column number where the "1A3" text is found.

Waiting for reply...
 
Upvote 0

Colin Legg

MrExcel MVP
Joined
Feb 28, 2008
Messages
3,497
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I believe it would be this:
Rich (BB code):
=INDEX('Selected (2)'!B8:IV56,
    MATCH(B10,'Selected (2)'!B8:B56,0),
    MATCH("1A3",'Selected (2)'!B8:IV8,0))

This formula replaces your entire VLOOKUP formula.
 
Upvote 0

loverfellow

Board Regular
Joined
Mar 4, 2008
Messages
116
A great many thanks buddy.
You saved my life.
There are excel legends like you in this forum. I hope to become one day.
 
Upvote 0

Forum statistics

Threads
1,191,388
Messages
5,986,321
Members
440,017
Latest member
vasanrajeswaran

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
Top