HERBERS Excel-Forum - das Archiv

Thema: Automatische Formel VBA

Automatische Formel VBA
Sonja

Hallo zusammen,
schon wieder ein problem :-(
Ich möchte per VBA die Formel automtisch nach unten ziehen. Aber es geht nicht. Immer kommt Fehler.
Sub Formel()
With Range("B2").Select
.Range("B2:E2").AutoFill Destination:=.Range("B2:E" & .Cells(Rows.Count, "A").End(xlUp).Row),   _
_
Type:=xlFillDefault
End With
End Sub

Ich habe in der Zelle A2 mein EAN und in der B2 bis E2 eine WENN(SVERWEIS) Formel,
Mein Code soll die Formel nach unten ziehen ausgangspunkt ist Spalte A
Lieben Gruß
Sonja

AW: Automatische Formel VBA
hary

Moin
Ohne with.
Range("B2:E2").AutoFill Destination:=Range("B2:E" & Cells(Rows.Count, "A").End(xlUp).Row), Type:=xlFillDefault

gruss hary

Danke Hary :-)
Sonja

.

Danke Hary :-)
Sonja

.

Automatische Formel VBA
Sonja

Hallo zusammen,
schon wieder ein problem :-(
Ich möchte per VBA die Formel automtisch nach unten ziehen. Aber es geht nicht. Immer kommt Fehler.
Sub Formel()
With Range("B2").Select
.Range("B2:E2").AutoFill Destination:=.Range("B2:E" & .Cells(Rows.Count, "A").End(xlUp).Row),   _
_
Type:=xlFillDefault
End With
End Sub

Ich habe in der Zelle A2 mein EAN und in der B2 bis E2 eine WENN(SVERWEIS) Formel,
Mein Code soll die Formel nach unten ziehen ausgangspunkt ist Spalte A
Lieben Gruß
Sonja

AW: Automatische Formel VBA
hary

Moin
Ohne with.
Range("B2:E2").AutoFill Destination:=Range("B2:E" & Cells(Rows.Count, "A").End(xlUp).Row), Type:=xlFillDefault

gruss hary

Danke Hary :-)
Sonja

.

Danke Hary :-)
Sonja

.

Bewerten Sie hier bitte das Excel-Portal