Dr. Demento
Member
I originally asked this question at MrExcel but got no takers so I thought I'd try here.
Using VBA, I need to find the .address of the cell within a header (rngHeader) that contains either "DoB" or "Birth*" ([Birth* = Birth or Birthdate or Birthday]; I'd like the seach/match to be case-insensitive).
This will capture any variation of Birth:
but this won't incorporate DoB (I tried both "&" and "or" separately)
I searched around but couldn't come up with anything that merged both multiple criteria and wildcards.
According to this post, I can assign multiple criteria by referencing the specific cells and concatenating the named range/cell; however, I'm actually searching for the column that contains ANY of the search criteria. Again, I'm trying to find the single column in the header that could contain any of the following terms: DoB OR Birthdate OR Birthday OR Date of Birth.
Thanks, y'all.
EDIT: I just realized I probably should have posted this question in the VBA Forum; my apologies. Mod, if you could transport my inquiry, I'd be appreciative ;-)
Using VBA, I need to find the .address of the cell within a header (rngHeader) that contains either "DoB" or "Birth*" ([Birth* = Birth or Birthdate or Birthday]; I'd like the seach/match to be case-insensitive).
This will capture any variation of Birth:
Code:
rngDoB = WorksheetFunction.Match("BIRTH*", rngHeader, 0)
Code:
rngDoB = WorksheetFunction.Match("BIRTH*" &/or "DoB", rngHeader, 0)
According to this post, I can assign multiple criteria by referencing the specific cells and concatenating the named range/cell; however, I'm actually searching for the column that contains ANY of the search criteria. Again, I'm trying to find the single column in the header that could contain any of the following terms: DoB OR Birthdate OR Birthday OR Date of Birth.
Thanks, y'all.
EDIT: I just realized I probably should have posted this question in the VBA Forum; my apologies. Mod, if you could transport my inquiry, I'd be appreciative ;-)