Having columns match numbers in one column

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Good Morning All,
Excel XP


Example:

A B C D E F
----------------------------------------------
1 Apples 3 x x x
2 Plums 2 x x
3 Grapes 0
4 Bananas 4 x x x x
5 Oranges 3 x x x


I have 5 products in A1:A5 and a number in B1:B5. Is it possible to have an
"x" placed automatically in C1:F5 for the numbers in B1:B5 and as they
change to automatically place the "x" in the column.
In this example if Apples total changes to 4, to have it place an "x" in F1.

Thanks in advance,
Mike
 
right click sheet tab>view code>copy paste this.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 2 Then Exit Sub
tr = Target.Row
Range(Cells(tr, 3), Cells(tr, Target + 2)) = "x"
End Sub
 
Back
Top