View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
choice[_2_] choice[_2_] is offline
external usenet poster
 
Posts: 84
Default change existing values

the tricky part is that i only want it to change the values of this months
entries:
(Columns)
(A) Date (B) Part number (C) Commission

"Don Guillett" wrote:

this will change old values to 10 if col a has 24 and col b matches part
nos.
right click sheet tabview codecopy paste thisSAVE

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 2 Then Exit Sub
If Target.Offset(0, -1) 24 Then
For Each c In Range("b2:b" & Cells(Rows.Count, "b").End(xlUp).Row)
If c = Target Then c.Offset(0, 1) = 10
Next
End If
End Sub

--
Don Guillett
SalesAid Software

"choice" wrote in message
...
I have a vlookup table with 3 columns (part number, below 25, above 25)
i sell part number 123456, i get $5 commission (up to 25)
after 25 commission goes to $10 (for all items sold even before 25)
so i have a list:
#24 123456 $5
#25 123456 $10

how can i get it to recalculate the first 24 to $10
(the problem is that i dont want to use equations i need values)
because next month the commission might change and i want these values to
stay the same

thanks in advance