Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does anybody know how to apply a special formatting to a cell in a way
that if "1" was typed in it it will display "1 Child" but if 2 or 3 or 4 was typed it shows "2 Childs" or "3 Childs" .... Thank you |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
No can do with formatting. Macro work. Rightclick the sheet tab, choose "view code", paste the following into the blank moule: Private Sub Worksheet_Change(ByVal Target As Range) Dim L As Long With Target(1) L = Val(.Value) Application.EnableEvents = False Select Case L Case 0 .Value = "No kids" Case 1 .Value = L & " Child" Case Else .Value = L & " Childs" End Select Application.EnableEvents = True End With End Sub HTH. Best wishes Harald skrev i melding oups.com... Does anybody know how to apply a special formatting to a cell in a way that if "1" was typed in it it will display "1 Child" but if 2 or 3 or 4 was typed it shows "2 Childs" or "3 Childs" .... Thank you |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try a format of
[1]0" Childs";[0]0" Child";General -- HTH Bob Phillips wrote in message oups.com... Does anybody know how to apply a special formatting to a cell in a way that if "1" was typed in it it will display "1 Child" but if 2 or 3 or 4 was typed it shows "2 Childs" or "3 Childs" .... Thank you |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Wohoo. I stand corrected. Thanks Bob.
Best wishes Harald "Bob Phillips" skrev i melding ... Try a format of [1]0" Childs";[0]0" Child";General |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
May I suggest an alternative:
[<1]0" Children";[=0]0" Child";General to follow correct grammar: 0 children 1 child 2 or more children "Harald Staff" wrote in message ... Wohoo. I stand corrected. Thanks Bob. Best wishes Harald "Bob Phillips" skrev i melding ... Try a format of [1]0" Childs";[0]0" Child";General |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
LOL. Guilty ... just answered the question.
Bob "William Benson" wrote in message ... May I suggest an alternative: [<1]0" Children";[=0]0" Child";General to follow correct grammar: 0 children 1 child 2 or more children "Harald Staff" wrote in message ... Wohoo. I stand corrected. Thanks Bob. Best wishes Harald "Bob Phillips" skrev i melding ... Try a format of [1]0" Childs";[0]0" Child";General |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I cheat...
# Child(ren) (but you may want to use Children instead of Childs when you use Bob's suggestion.) wrote: Does anybody know how to apply a special formatting to a cell in a way that if "1" was typed in it it will display "1 Child" but if 2 or 3 or 4 was typed it shows "2 Childs" or "3 Childs" .... Thank you -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Advanced Conditional Formatting | Excel Worksheet Functions | |||
Advanced conditional formatting | Excel Discussion (Misc queries) | |||
Advanced Conditional Formatting Ideas Needed! (ok, maybe not that advanced...) | Excel Discussion (Misc queries) | |||
Advanced Conditonal Formatting | Excel Programming | |||
Advanced Conditional Formatting | Excel Programming |