Filling a cell based on the content of another cell
That code is backwards from what you described:
If the value in
E2 says infant then I would need R2 filled with Daycare otherwise the cell
would need to be filled with preschool.
Also, notice how you have Daycare as one word.
--
Regards,
Tom Ogilvy
"Bill" wrote in message
...
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.
|