在VBA中引人注目 [英] Substring in VBA
本文介绍了在VBA中引人注目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有不同单元格中的多个字符串,如
I have multiple strings in different cells like
CO20: 20 YR CONVENTIONAL
FH30: 30 YR FHLMC
FHA31
我需要将子串从1到达到:的索引,或者这是不可用的,直到结束(在字符串3的情况下)。我需要帮助在VBA写这个。
I need to get the substring from 1 to till index of ':' or if that is not available till ending(in case of string 3). I need help writing this in VBA.
推荐答案
更短:
Split(stringval,":")(0)
这篇关于在VBA中引人注目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文