[FONT=lucida console][COLOR=Royalblue]Private[/COLOR] [COLOR=Royalblue]Sub[/COLOR] Worksheet_Change([COLOR=Royalblue]ByVal[/COLOR] Target [COLOR=Royalblue]As[/COLOR] Range)
[COLOR=Royalblue]If[/COLOR] Target.Cells.CountLarge <> [COLOR=crimson]1[/COLOR] [COLOR=Royalblue]Then[/COLOR] [COLOR=Royalblue]Exit[/COLOR] [COLOR=Royalblue]Sub[/COLOR]
[COLOR=Royalblue]If[/COLOR] [COLOR=Royalblue]Not[/COLOR] Intersect(Target, Range([COLOR=brown]"B1"[/COLOR])) [COLOR=Royalblue]Is[/COLOR] [COLOR=Royalblue]Nothing[/COLOR] [COLOR=Royalblue]Then[/COLOR]
[COLOR=Royalblue]Dim[/COLOR] ary, x
[COLOR=Royalblue]Dim[/COLOR] i [COLOR=Royalblue]As[/COLOR] [COLOR=Royalblue]Long[/COLOR], z [COLOR=Royalblue]As[/COLOR] [COLOR=Royalblue]Long[/COLOR], j [COLOR=Royalblue]As[/COLOR] [COLOR=Royalblue]Long[/COLOR]
ary = Split([COLOR=brown]"RED,BLUE,YELLOW,GREEN"[/COLOR], [COLOR=brown]","[/COLOR])
Application.EnableEvents = [COLOR=Royalblue]False[/COLOR]
x = Target.Value
[COLOR=Royalblue]If[/COLOR] IsNumeric(x) [COLOR=Royalblue]And[/COLOR] x > [COLOR=crimson]0[/COLOR] [COLOR=Royalblue]Then[/COLOR]
Range([COLOR=brown]"B2:B"[/COLOR] & Rows.Count).ClearContents
z = x * (UBound(ary) + [COLOR=crimson]1[/COLOR])
[COLOR=Royalblue]ReDim[/COLOR] va([COLOR=crimson]1[/COLOR] [COLOR=Royalblue]To[/COLOR] z, [COLOR=crimson]1[/COLOR] [COLOR=Royalblue]To[/COLOR] [COLOR=crimson]1[/COLOR])
[COLOR=Royalblue]For[/COLOR] [COLOR=Royalblue]Each[/COLOR] a [COLOR=Royalblue]In[/COLOR] ary
[COLOR=Royalblue]For[/COLOR] i = [COLOR=crimson]1[/COLOR] [COLOR=Royalblue]To[/COLOR] x
j = j + [COLOR=crimson]1[/COLOR]
va(j, [COLOR=crimson]1[/COLOR]) = a
[COLOR=Royalblue]Next[/COLOR]
[COLOR=Royalblue]Next[/COLOR]
Range([COLOR=brown]"B2"[/COLOR]).Resize(UBound(va, [COLOR=crimson]1[/COLOR]), [COLOR=crimson]1[/COLOR]) = va
[COLOR=Royalblue]End[/COLOR] [COLOR=Royalblue]If[/COLOR]
Application.EnableEvents = [COLOR=Royalblue]True[/COLOR]
[COLOR=Royalblue]End[/COLOR] [COLOR=Royalblue]If[/COLOR]
[COLOR=Royalblue]End[/COLOR] [COLOR=Royalblue]Sub[/COLOR][/FONT]