simple..validation..

  • Thread starter Thread starter poonam
  • Start date Start date
P

poonam

Coloumn A contains AMount.
Coloumn B contains Quantity
Coloumn C contains formula A1*B1
I dont want to use protect worksheet and dont allow users
to change cells containing A1*B1
Is there anyway i can do it using validation?
I did custom validation and entered formula A1*B1
But it still lets me modify the cell.
Something wrong with excel or what?
Thanks.
 
Hi
either use 'protect sheets' or no chance :-)
Why can't you use this protection mechnismn?
 
You could use the worksheet change event: the example below will prevent any
changes to column C. Copy the code, right click on the sheet tab of the
worksheet you want to "protect", select "View Code", then paste the code in
the window that appears.

HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C:C")) Is Nothing Then
With Application
.EnableEvents = False
.Undo
Msgbox "Hey! Don't change column C!"
.EnableEvents = True
End With
End If
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

Back
Top