Forum Discussion

tgjones43's avatar
tgjones43
Helper IV
7 years ago
Solved

Look at specific character in a text string

Hi all

 

I have a text column where every value is a 12 character string of numbers and letters. I need some M code that checks whether the 7th letter is a number 0, that I can then incorporate into a conditional column function.

 

I assume Text.Middle is the one to use but I cannot find an example where it has been used for this purpose. Can anyone help?

 

Many thanks.

  • if Text.Range("Your string", 6, 1) = "0" Then 1 else 0

2 Replies