dim MAXSpalten
As
Integer
dim MAXZeilen
As
Integer
dim zaehlerZeile as integer
dim zaehlerSpalte as integer
dim textZ1 as string
dim textZ2 as string
dim textZ3 as string
dim text_SP2 as string
dim text_SP3 as string
MAXSpalten = ActiveWorkbook.Sheets(
"Tabelle1"
).Cells(1,Columns.Count).
End
(xlToLeft).column
MAXZeilen = Activeworkbook.Sheets(
"Tabelle1"
).Cells(Rows.Count,1).
End
(xlUp).Row
For
zaehlerSpalte = 1 to MAXSpalten
If
Sheets(
"Tabelle1"
).Cells(1,zaehlerSpalte).value = textZ1 AND _
Sheets(
"Tabelle1"
).Cells(2,zaehlerSpalte).value = textZ2 AND _
Sheets(
"Tabelle1"
).Cells(3,zaehlerSpalte).value = textZ3
then
For
zaehlerZeile = 1 to MAXZeilen
If
Sheets(
"Tabelle1"
).Cells(zaehlerZeile,2).value = textSP2 AND _
Sheets(
"Tabelle1"
).Cells(zaehlerZeile,3).value = textSP3 then
Sheets(
"Tabelle2"
).Cells(y,x).value = Sheets(
"Tabelle1"
).Cells(zaehlerZeile,zaehlerSpalte).value
Exit
For
Else
MSGBOX (
"Projektnummer und Kostenart-Kombination nicht gefunden"
)
End
If
Next
zaehlerZeile
Exit
For
Else
MSGBOX (
"XX, Saldo und Monats-Kombination nicht gefunden"
)
End
If
Next
zaehlerSpalte
Ich hoffe, dass ist das was du gesucht hast.