I'm trying to pull a list of people based on their last names. The catch is I only want to QUERY people with last names that fit between an alpha range to the 4th character.
Example
I only want names that fall between Mimz and Sand
I have this formula, but it doesn't go to the 4th character and I don't understand how to update.
=QUERY(data!B1:J30000, "Select B, C, D, E, F, G, H, I, J where lower(D) matches
'^(m[k-z]|[n-r]|sa).*' order by D")
I believe the adjustment needs to be made here (m[k-z]|[n-r]|sa)
but I don't know the syntax.
Any help is greatly appreciated.
Link to copy of report tab
Link to copy of data tab (simplified)
Best Answer
Since this is more a regular expression logic update, I can contribute:
Try:
Just keep in mind that the range above needs to differ by the first character. If not, then pull the common characters out. For mimz-mitz:
Not saying there isn't an easier way -- this just helps you update this particular way in the future.