excel - vba WorksheetFunction.Match search for multiple values -


i searching hr sheet column header contains specific text. text can change each week, example, column called "state/province" have no spaces in 1 week, following week "state / province" (notice space between words).

i using below code looks 1 condition

stateprovince = worksheetfunction.match("state/province", hr.sheets("open").rows(1), 0) 

this works fine, looking add looks second example containing spaces if case column header. suggestions?

use:

stateprovince = worksheetfunction.match("state*/*province", hr.sheets("open").rows(1), 0) 

this answer specific question. if want more generic solution you'll have provide other examples.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -