ich habe hier schon einige Hilfe gefunden aber leider nicht zu dem Problem was ich gerade habe.
Ich möchte in eine aufeinanderfolgende anzahl von Zellen einen Text schreiben und an diesen Text jeweil noch ein Indize anhängen.
Also so was wie:
Originaltext = Test
In die Zellen rechts daneben und darunter soll Test1, Test2, Test3 usw. geschrieben werden.
Das indize ist auch eine Variable die sich je nach Datenblock ändert.
Das habe ich bisher erstellt.
Leider habe ich absolut keine Ahnung wie ich VBA beibrigen soll den Text jeweils mit dem Inhalt der Variablen ALS TEXT! in einen andere Zelle zu scheiben.
-----------------------------------------------------------------------
Sub AllowSorting()
Dim MaxLines As Integer
Dim iSortBlocs As Integer
Dim A As Integer
Dim B As Integer
Dim iLinesMain As Integer
Dim iLines
Sub As Integer
Application.ScreenUpdating = False
MaxLines = Cells(94, 8).Value 'Set variable "MaxLines" to the value written in Row 8, line 94
For iSortBlocs = 100 To MaxLines 'Use the index "iSortBlocs" and start at 100 until the value _
_
of "MaxLines" and do the following
If Cells(iSortBlocs, 21) > 0 Then ' Check if in this cell is any value greater than 0
A = Cells(iSortBlocs, 21).Value 'If there is a vlaue >0 then set the variable A to this _
value
For B = 0 To A 'Use the index "B" and start at 0 until the value of "A" and do the _
following
AktiveSheet.Cells(iSortBlocs + B, 22) = Cells(iSortBlocs, 7).Value + B + 1 ' Write in _
_
this cell the text written in row 7 and add the value of B + 1 as Text
Next 'Add 1 to B
End If
Next 'Add 1 to iSortBlocs
Application.ScreenUpdating = True
End Sub
-----------------------------------------------------------------------
Danke für das Entfernen des Bretts vor meinem Kopf :-)