How to find the first instance of a "lower case character" in a cell using VBA in Excel?
I have tried using ASCII values but that didn't work.
相关问题
- Excel sunburst chart: Some labels missing
- Error handling only works once
- Error handling only works once
- Excel formula in VBA code
- Excel VBA run time error 450 from referencing a ra
相关文章
- Get column data by Column name and sheet name
- programmatically excel cells to be auto fit width
- Unregister a XLL in Excel (VBA)
- Unregister a XLL in Excel (VBA)
- How to prevent excel from truncating numbers in a
- numeric up down control in vba
- Declare a Range relative to the Active Cell with V
- What's the easiest way to create an Excel tabl
You can use a
RegExp
in a UDF to avoid looping through each character:Another
RegExp
solution which needs to addig referance toMicrosoft VBScript Regular Expressions 1.0
(In theVBA
window,Tools->Referances
menu)And another solution nor
Like
neitherRegExp
is used:Another solution in which
replace
function is used:I think you want to remove the first part in your string that is in lower case:
Try the following small UDF:
It will return the position of the first instance of any lower case letter in a string: