ÿþ<HTML> <HEAD> <meta http-equiv="Content-Language" content="cs"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1250"> <title>VBA code</title> </HEAD> </P> <TABLE WIDTH="100%" ALIGN=CENTER CELLSPACING="0" BORDER="0"> <TR> <TD width="27%" align="LEFT" bordercolordark="#000000"><HR><P></TD> <TD ALIGN=CENTER>&nbsp;<P></TD> <TD ALIGN=CENTER>&nbsp;<P></TD> </TR> </TABLE> <style> <!-- a {text-decoration:none} a {color:RED} a {cursor: crosshair;} a:hover {color:WHITE} BODY { SCROLLBAR-FACE-COLOR:"#282828"; SCROLLBAR-HIGHLIGHT-COLOR:"SaddleBrown"; SCROLLBAR-SHADOW-COLOR:"LightSlateGray"; SCROLLBAR-3DLIGHT-COLOR:"LavenderBlush"; SCROLLBAR-ARROW-COLOR:"LightSlateGray"; SCROLLBAR-TRACK-COLOR:"LightSlateGray"; SCROLLBAR-DARKSHADOW-COLOR:"GRAY"; } --> </style> <body leftmargin="0" topmargin="0" marginwidth="0" marginheigt="0" link="BLACK" vlink="BLACK" alink="#C0C0C0" text="LavenderBlush"> <div align="left"> <body bgcolor="#111111"> <TABLE WIDTH="100%" ALIGN=CENTER CELLSPACING="0" BORDER="0"> <TR> <TD ALIGN="LEFT"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></b></p> </TD> <font face="Arial CE, Helvetica CE, Arial, Helvetica, sans-serif"> <TD ALIGN="LEFT"><b> <font color="LavenderBlush" style="font-size: 14pt">WorkSheet_Change(ByVal Terget As Change), Target.Address, EnableEvents <p align="LEFT"><font color="LavenderBlush" style="font-size: 10pt"> <font face="Arial CE, Helvetica CE, Arial, Helvetica, sans-serif"> Private Sub Worksheet_Change(ByVal Target As Range) <BR><BR> Dim strPneu As String<BR> Dim strKategorie As String<BR> Dim n As Integer<BR> Dim intn As Integer <BR><BR> Application.ScreenUpdating = False <BR><BR> &nbsp;&nbsp;&nbsp;&nbsp; n = 1 &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; intn = 1 <BR><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; strPneu = ActiveCell.Value <BR><BR> If Target.Address = "$C$3" Then <BR><BR> &nbsp;&nbsp;&nbsp;&nbsp; Application.EnableEvents = False <BR><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Columns("CE:CE").Select<BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Selection.ClearContents<BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Cells(n, 81).Activate <BR><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Do While Not IsEmpty(ActiveCell) <BR><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; If ActiveCell.Value = strPneu Then<BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; ActiveCell.Offset(0, 1).Select<BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; strKategorie = ActiveCell.Value<BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Cells(intn, 83).Activate<BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; ActiveCell.Value = strKategorie<BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; intn = intn + 1<BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; End If <BR><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Cells(n, 81).Activate<BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; ActiveCell.Offset(1, 0).Select<BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; n = n + 1 <BR><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Loop <BR><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Application.EnableEvents = True <BR><BR> End If <BR><BR> Range("C3").Activate <BR><BR> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Application.ScreenUpdating = True <BR><BR> End Sub <BR><P> </FONT></b></p></TD> <BR><P> </TD> <TD ALIGN="LEFT"><b> <p align="LEFT"><font color="LavenderBlush" style="font-size: 14pt"> </FONT> <p align="LEFT"><font color="LavenderBlush" style="font-size: 10pt"> <BR> <BR><P> <BR><P> <BR><P> <BR><P> </TD> </TR> </TABLE> <p align="RIGHT">Main &nbsp; <a href="http://tf.czu.cz/~ales/vba">+</a>&nbsp; &nbsp; &nbsp; &nbsp; <p align="RIGHT"><font color="SILVER" style="font-size: 8pt"> 2009 &nbsp; &nbsp; </BODY> </HTML>