Having columns match numbers in one column

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
 
D

Don Guillett

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top