VBA - please modify the provided code

MarekZ

New Member
Joined
Aug 1, 2018
Messages
1
Czy możesz mi powiedzieć, jak powinien wyglądać poprawny kod i gdzie popełniam błąd?

Mój kod to:
Sub Dowodcy ()
'
' Dowodcy MAKRO
"


Jeżeli jest to wartość ( "C2") = Wartość ( "BA2"), a następnie

Range ( "J3: AN4"). Wybierz
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 1
Range ("F19") Wybierz
Selection.PasteSpecial Paste: = xlPasteAll, Operation: = xlNone, SkipBlanks: = _
False, Transpose: = True
Range ("J5:
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 1
Range ("B19") Wybierz
Selection.PasteSpecial Paste: = xlPasteAll, operacja : = XlNone, SkipBlanks: = _
False, Transpose: = True

ElseIf Value ("C11") = Wartość ("BA11") Następnie

zakres ("J12: AN13") Wybierz
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 1
Range ("F19") Wybierz
Selection.PasteSpecial Paste: = xlPasteAll, Operation: = xlNone, SkipBlanks: = _
False, Transpose: = True
Range ("J13: AN14"). Wybierz
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 1
Range ("B19") Wybierz
Selection.PasteSpecial Paste: = xlPasteAll, Operacja: = xlNone, SkipBlanks: = _
False, Transpose: = True
End If


End Sub



Błąd kompilacji: Sub lub Funkcja niezdefiniowana Dziękuję.


 

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Watch MrExcel Video

Forum statistics

Threads
1,108,579
Messages
5,523,705
Members
409,531
Latest member
Lmfacc

This Week's Hot Topics

Top