Dennis Marks <denmarks <at> yahoo.com> writes: > .... > >I have a spreadsheet with multiple records (lines). Within each record > >there is a cell containing 1 or more strings separated by commas. Is there > >a way to search for a string and return the line number of the record that > >contains the cell with the string. For example: > > LINE CELL1 CELL2 CELL3 CELL4 CELL5 > > 0001 AAAA BBBBB CCCC a, b, c, d, EEEEE > > 0002 AAAA BBBBB CCCC e, f, g, h, EEEEE > > > > Search the column with cell4 and find the line with the f in it. Line 2 > > would be returned. I know that I can search for e,f,g,h and find it but I > > want to only search for a single item. > > I don't follow your example but I think the MATCH function might be what you're after. To illustrate, I have a vertical list with 14 text codes and a heading, a total of 15 rows. In the 10th row, the code "HZN". To get an exact match, I use the parameter 1: =MATCH("HZN";_TableCodes;1) which yields 10. If I change the parameter to 0 and look for a near match: =MATCH("HSN";_TableCodes;0) I get 9 although the code in the previous row is FML. You work it out, I can't. If I want an exact match and try =MATCH("HSN";_TableCodes;0), I get #N/A.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]