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
Post a Comment