Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
conditional formatting one cell based on content of another cell | Excel Discussion (Misc queries) | |||
Conditional cell background formatting, based on cell content | Excel Discussion (Misc queries) | |||
Automatically filling in cells based on another cell's content | Excel Worksheet Functions | |||
Cell Formula reference to cell Based On third Cell Content | Excel Discussion (Misc queries) | |||
Cell Formula reference to cell Based On third Cell Content | Excel Discussion (Misc queries) |