Tak už som vyriešila aj druhý problém so zachovaním vzorcov a odkazov. Len by som trochu potrebovala učesať makro, ktoré som si nahrala, aby nebolo také dlhé.
Mohla by som vybrať oblasť (Array), ale oddelenie OK má oblasť 29 a Očné iba 25, tak neviem ošetriť výnimku.
FaP som trochu skrátila, neviem či sa dá ešte viac.
Sheets("KUCH").Select
Range("E3").Select
ActiveCell.FormulaR1C1 = "=INDIRECT(""'zoznam pacientov'!$D$4"")"
Range("E3").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("E3:E28"), Type:=xlFillDefault
Range("E3:E28").Select
Sheets("OK").Select
Range("E3").Select
ActiveCell.FormulaR1C1 = "=INDIRECT(""'zoznam pacientov'!$D$5"")"
Range("E3").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("E3:E29"), Type:=xlFillDefault
Range("E3:E29").Select
Sheets("NK").Select
Range("E3").Select
ActiveCell.FormulaR1C1 = "=INDIRECT(""'zoznam pacientov'!$D$6"")"
Range("E3").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("E3:E28"), Type:=xlFillDefault
Range("E3:E28").Select
Sheets("UK").Select
Range("E3").Select
ActiveCell.FormulaR1C1 = "=INDIRECT(""'zoznam pacientov'!$D$7"")"
Range("E3").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("E3:E28"), Type:=xlFillDefault
Range("E3:E28").Select
Sheets("ORL").Select
Range("E3").Select
ActiveCell.FormulaR1C1 = "=INDIRECT(""'zoznam pacientov'!$D$8"")"
Range("E3").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("E3:E28"), Type:=xlFillDefault
Range("E3:E28").Select
Sheets("OMFCH").Select
Range("E3").Select
ActiveCell.FormulaR1C1 = "=INDIRECT(""'zoznam pacientov'!$D$9"")"
Range("E3").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("E3:E28"), Type:=xlFillDefault
Range("E3:E28").Select
Sheets("KPCH").Select
Range("E3").Select
ActiveCell.FormulaR1C1 = "=INDIRECT(""'zoznam pacientov'!$D$10"")"
Range("E3").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("E3:E28"), Type:=xlFillDefault
Range("E3:E28").Select
Sheets("Očné").Select
Range("E3").Select
ActiveCell.FormulaR1C1 = "=INDIRECT(""'zoznam pacientov'!$D$11"")"
Range("E3").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("E3:E25"), Type:=xlFillDefault
Range("E3:E25").Select
Sheets("FaP").Select
Range("B2").Select
ActiveCell.FormulaR1C1 = "=INDIRECT(""'zoznam pacientov'!$D$4"")"
Range("B3").Select
ActiveCell.FormulaR1C1 = "=INDIRECT(""'zoznam pacientov'!$D$5"")"
Range("B4").Select
ActiveCell.FormulaR1C1 = "=INDIRECT(""'zoznam pacientov'!$D$6"")"
Range("B5").Select
ActiveCell.FormulaR1C1 = "=INDIRECT(""'zoznam pacientov'!$D$7"")"
Range("B6").Select
ActiveCell.FormulaR1C1 = "=INDIRECT(""'zoznam pacientov'!$D$8"")"
Range("B7").Select
ActiveCell.FormulaR1C1 = "=INDIRECT(""'zoznam pacientov'!$D$9"")"
Range("B8").Select
ActiveCell.FormulaR1C1 = "=INDIRECT(""'zoznam pacientov'!$D$10"")"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=Falsecitovat