Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding multiple values in a range

Status
Not open for further replies.
Feb 6, 2012
11
US
I need to find 1 of 4 values in a range and report which one was found in the next column. Example...

RV____TW____3C____IS____9S_____NQ____N2____65____JA____PQ____DC____IW____QA

(underlines purely to distinguish columns)

I need to search through that row and find one of the following values: 1A, 2B, 3C, 4D. In this example, 3C is in the row; so I would want the next column to display 3C

There will never be more than 1 of those values in a row.

Can help would be appreciated.

Thanks!
 
Hi,

Assuming that your row of values is in A1:M1...
[tt]
N1: =index(A1:M1,1,
if(isna(match("1A",A1:M1,0)),0,match("1A",A1:M1,0))+
if(isna(match("2B",A1:M1,0)),0,match("2B",A1:M1,0))+
if(isna(match("3C",A1:M1,0)),0,match("3C",A1:M1,0))+
if(isna(match("4D",A1:M1,0)),0,match("4D",A1:M1,0)))

[/tt]


Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Do this;
"(underlines purely to distinguish columns)" actually mean;

The underscores distinguish and empty column??

or does it mean

The underscores distinguish an empty CELL in the row of data??

Which is what your example data seems to indicate.


And does the range have a 'name' or is it just a row number.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.
 
Thank you SkipVought!

I just needed to change the commas to semicolons and all worked perfectly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top