Ale pokial trvas na makre, tak do kodoveho okna harku 1 vloz:Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$F$9" Then
[F10] = WorksheetFunction.VLookup(Target, Sheets("Dodavatelia").Range("A:D"), 2, 0)
[F11] = WorksheetFunction.VLookup(Target, Sheets("Dodavatelia").Range("A:D"), 3, 0)
[G14] = WorksheetFunction.VLookup(Target, Sheets("Dodavatelia").Range("A:D"), 4, 0)
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If [F9].Value = "" Then
[F10,F11,G14] = ""
End If
End Subcast Worksheet_SelectionChange osetruje pripad, kedy vymazez z bunky F9 dodavatela (ale musis potvrdit enterom)
edit: vlastne, ty nepises, ze chces makro, cize vzorec pre F10: =IFERROR(VLOOKUP('Objednavka textova'!F9:H9; Dodavatelia!A:D; 2; 0); "")do tych dalsich buniek si uz doplnis..citovat