# Find text based on column number

#### loverfellow

##### Board Regular
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
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

#### loverfellow

##### Board Regular
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.

#### Colin Legg

##### MrExcel MVP
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.

#### loverfellow

##### Board Regular
A great many thanks buddy.
You saved my life.
There are excel legends like you in this forum. I hope to become one day.

Replies
3
Views
388
Replies
7
Views
215
Replies
4
Views
196
Replies
6
Views
239
Replies
3
Views
564

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.

### Which adblocker are you using?

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

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