firlandsfarm wrote: ↑Sat Jan 18, 2025 10:08 am
Using ChatGPT to sort some football data and produce a CSV file for me to download but 'special' characters are appearing in the team names such as "Leganés vs. Atlético Madrid" ... is there a setting I need to adjust?
You could try telling it to run this on your data:
Sub ReplaceAccentedChar()
Const sFm As String = "ŠŽšžŸÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðñòóôõöùúûüýÿ"
Const sTo As String = "SZszYAAAAAACEEEEIIIIDNOOOOOUUUUYaaaaaaceeeeiiiidnooooouuuuyy"
Dim i As Long, ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
For i = 1 To Len(sFm)
ws.Cells.Replace Mid(sFm, i, 1), Mid(sTo, i, 1), LookAt:=xlPart, MatchCase:=True
Next i
Next ws
End Sub
And that will leave just the czechoslovakia special chars + a few others e.g.
Ø
ć
ø
č
ğ
ă
ș
ß
Č
ź
ń
ı
š
İ
edit - although looking at your data issue more closely - looks like something else is going on !