Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Worksheet event code help required

Status
Not open for further replies.

advox1

Technical User
Nov 28, 2003
26
0
0
GB
I am working on a worksheet where I want to check what is entered in cells c2:c49 and if that is = "ADMINISTRATION" an event occurs.

In column F is a start time, in column G there is a finish time and in columns H & I there is a formula to work out the actual time spent doing a task.

The event is that if the cell in column C = ADMINISTRATION then either the formula is removed from the adjacent cell in column H or the value is changed to 0 and if the cell in column C does not = "ADMINISTRATION" then the formula is removed or the value is changed to 0 in column I.

The information in entered into the worksheet via an inputform if this makes any difference.

Can anyone help?

Thanks

Jo
 
This should get you started:
Code:
If target.column <> 3 then exit sub
If target.row < 1 or target.row > 49 then exit sub
If ucase(target.value) <> "ADMINISTRATION" then exit sub
application.enableevents = false
'Code here to set the formula removal / numeric entry
'OFFSET would be a good place to start looking
application.enableevents = true
end sub

Rgds, Geoff
[blue]Experience is something you don't get until just after you need it[/blue]
We want to help [red]you[/red] Help us by reading this FAQ 1st faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top