View Single Post
  #14   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

Both sets of code produce the same results. I gave you the variables in the
wrong spot. I think the problem is that Day Care is two words in our system.
If I make it one word it works great but our system has it listed as two
words.

For mm = 2 To ActiveSheet.Cells(Rows.Count, "E").End(xlUp).Row
If Cells(mm, 5).Text = "DAY CARE" Then
Cells(mm, 18) = "INFANT"
Else
Cells(mm, 18) = "CHILD"
End If
Next


"Lonnie M." wrote:

Hi, thanks for your feedback, I just tested it again and it worked just
fine for me.
If I placed "infant" in "E2", "R2" correctly placed "Daycare"
If I placed "child" in "E3", "R3" correctly placed "Preschool"
If I placed "6" in "E4", "R4" correctly placed "Preschool"

I'm not sure what went wrong for you. You may want to make sure that
the value in the else statement wasn't changed to "infant"
HTH--Lonnie M.