# Returning Fields after "x" on each row.

#### QuickJeff

##### New Member
I've tried a few different things. I would like to search horizontally by row for "x", then return the values from a couple of cells nest to the X.

Messed with HLOOKUP and V LOOKUP, yet I haven't figured out if it's appropriate for this.
All I need is someone to point me in the right direction : )

Last edited:

### Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Can there be more than one x on each row?

This might get you started:

Excel 2016 (Windows) 32 bit
ABCDEFGHIJ
21TrianglesaSquaresaxCirclesa
32xTrianglesbSquaresbCirclesb
43TrianglescxSquarescCirclesc
54xTrianglesdSquaresdCirclesd
65TrianglesexSquareseCirclese
76TrianglesfSquaresfxCirclesf
87xTrianglesgSquaresgCirclesg
9
10
111Circlesa
122Trianglesb
133Squaresc
144Trianglesd
155Squarese
166Circlesf
177Trianglesg
Sheet1
Cell Formulas
RangeFormula
B11=INDEX(\$B2:\$J2,,MATCH("x",\$B2:\$J2,0)+1)
C11=INDEX(\$B2:\$J2,,MATCH("x",\$B2:\$J2,0)+2)

Get me started? You way surpassed that. Thank you!

I never really have understood the index function, yet I use it heavily from a formula I was once given. I think I'll take the time to learn a bit more. Happy new year 2017 : )

You're welcome!

I'm getting better at it. I came to the realization that "A" may not also be there, in which case I get the dreaded eyesore #N/A.

=IF('Measure Sheet'!C24=" "," ",

to an index like this
=INDEX(\$CB25:\$XFD25,,MATCH("A",\$CB25:\$XFD25,0)+8)

If've tried a few combinations, but I can't seem to figure it out!

Like this:

=IF('Measure Sheet'!C24="","",INDEX(\$CB25:\$XFD25,,MATCH("A",\$CB25:\$XFD25,0)+8))

Use "", not " ".

Last edited:
Like this:

=IF('Measure Sheet'!C24="","",INDEX(\$CB25:\$XFD25,,MATCH("A",\$CB25:\$XFD25,0)+8))

Use "", not " ".

Haha, that was an easy fix. I realized I had a few formulas were incorrect without the space between the two. Thank you for all the help!

My pleasure.

You know. I ran into what I thought I would!

If there is no match in the index, how would I return a blank instead of the #N/A.
(I tried using the index itself, but didn't get very far. I imagine the fix is an IFERROR condition, but I could be wrong.)

=INDEX(\$BY25:\$XFD25,,MATCH("B",\$BY25:\$XFD25,0)+2))

Replies
9
Views
2K
Replies
1
Views
800
Replies
4
Views
2K
Replies
0
Views
962
Replies
2
Views
693

1,196,152
Messages
6,013,752
Members
441,781
Latest member
Gian Carlos

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