简体   繁体   中英

MATCH lookup values in multiple columns

I've a table with multiple columns of the attribute IP addresse. I want to search for the IP address in all the column, say B to F, and if the value is found in any of these column, return that row index.

I've tried MATCH but it seem to be able to only search in single column and not the range of columns that I give it.

=MATCH(CONCATENATE("*",TRIM(A1)),machine_name!$B$1:$F$288,0)

Sample Table

To return the row number of a wildcard match to a partial IP in A1 try,

'for 192.168.0.*
=AGGREGATE(15, 7, ROW($1:$288)/(LEFT($B$1:$F$288, LEN(A1))=A1), 1)
'for *.168.0.10
=AGGREGATE(15, 7, ROW($1:$288)/(RIGHT($B$1:$F$288, LEN(A1))=A1), 1)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM