Skip to content

Instantly share code, notes, and snippets.

@sinancetinkaya
Last active December 16, 2015 12:38
Show Gist options
  • Save sinancetinkaya/5435668 to your computer and use it in GitHub Desktop.
Save sinancetinkaya/5435668 to your computer and use it in GitHub Desktop.
Excel'de ki bir veriyi parçalara bölmek
Private Sub Workbook_SheetChange(ByVal SAYFA As Object, ByVal HUCRE As Range)
Application.EnableEvents = False
'Ayraç olarak boşluk kullandım siz başka birşey kullanabilirsiniz.
ayrac = " "
metin = HUCRE.Text
With HUCRE
ayracpos = InStr(1, metin, ayrac)
kolon = 0
While ayracpos >= 1
kolon = kolon + 1
.Offset(, kolon) = Mid(metin, 1, ayracpos - 1)
metin = Mid(metin, ayracpos + 1)
ayracpos = InStr(1, metin, ayrac)
Wend
kolon = kolon + 1
.Offset(, kolon) = metin
End With
Application.EnableEvents = True
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment