View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Bill Bill is offline
external usenet poster
 
Posts: 390
Default Filling a cell based on the content of another cell

Lonnie

We put it in the workbook_open

Lonnie this filled the column. However Row 2 contained infant and the word
Daycare was inserted into row 18. Row 3 contained child but infant instead
of Preschool was listed in column 18. All the cells in the column displayed
infant no matter what column was listed in column E cells


"Lonnie M." wrote:

Bill, if you want it to do this each time you open the workbook, along
with the example above in a standard module, add this within the
'ThisWorkbook' module:
Public Sub Workbook_Open()
addType
End Sub

If you want it to update every time that sheet changes use a change
event in that sheet's module:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column = 5 Then
Application.EnableEvents = False
Call addType
Application.EnableEvents = True
End If
End Sub