AlexanderBB
Well-known Member
- Joined
- Jul 1, 2009
- Messages
- 2,073
- Office Version
- 2019
- 2010
- Platform
- Windows
How do you detect if text in a cell starts with a leading apostrophe ? TIA.
I am not sure that you can; but, given that Excel hides it from you and from all output and calculations, why would you need to know this?How do you detect if text in a cell starts with a leading apostrophe ? TIA.
but as the cell isn't Selected, I'm trying some changes.
Dim c As Range
For Each c In Worksheets("Sheet1").Range("C" & kRow)
Debug.Print c.PrefixCharacter
Next
Correct... the loop is not necessary for a single cell. If kRow has a value in it, then...I didn't have a range Mark, was using .cells(row, column). Now trying thus
As you can probably tell, I'm no expert. The For loop seems is only executed once, so maybe isn't necessary?Code:Dim c As Range For Each c In Worksheets("Sheet1").Range("C" & kRow) Debug.Print c.PrefixCharacter Next
If (CStr(.Cells(kRow, i)) <> Nz(r(SM(.Cells(1, i))))) And ("'" & CStr(.Cells(kRow, i)) <> Nz(r(SM(.Cells(1, i))))) Then
CommaBit = IIf(i = 3, Evaluate(TitleCol).PrefixCharacter, "") 'TitleCol= "Sheet1!$B$178"
If CommaBit & CStr(.Cells(kRow, i)) <> Nz(r(SM(.Cells(1, i)))) Then