Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I need a formula that, once locked, the cells in Column A will only accept
uppercase B's or S's and nothing else (no other letters, numbers, characters, etc.). HELP!? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try Data Validation.
-- David Biddulph "ashley" wrote in message ... I need a formula that, once locked, the cells in Column A will only accept uppercase B's or S's and nothing else (no other letters, numbers, characters, etc.). HELP!? |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Data =Validation
Allow: List Source: S,B "ashley" wrote: I need a formula that, once locked, the cells in Column A will only accept uppercase B's or S's and nothing else (no other letters, numbers, characters, etc.). HELP!? |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You could use Data-Validation.
Allow: List Source: B,S That should do what you want. HTH, Paul "ashley" wrote in message ... I need a formula that, once locked, the cells in Column A will only accept uppercase B's or S's and nothing else (no other letters, numbers, characters, etc.). HELP!? |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Data Validation Allow: Custom Formula:
=AND(OR(CODE(A1)=66,CODE(A1)=83),LEN(A1)=1) "ashley" wrote: I need a formula that, once locked, the cells in Column A will only accept uppercase B's or S's and nothing else (no other letters, numbers, characters, etc.). HELP!? |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You are using B's and S's does that mean you can allow for instance BS or
BBBB or SSSS etc? -- Regards, Peo Sjoblom "ashley" wrote in message ... I need a formula that, once locked, the cells in Column A will only accept uppercase B's or S's and nothing else (no other letters, numbers, characters, etc.). HELP!? |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Ashley,
For multiple Bs & Ss I had to resort to a macro:- Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A:A")) Is Nothing Then For x = 1 To Len(Target.Value) If Mid(Target.Value, x, 1) = "B" Or Mid(Target.Value, x, 1) = "S" Then Else MsgBox ("Illegal entry, Capital B or S only") Target.Value = "" End If Next End If End Sub Mike "ashley" wrote: I need a formula that, once locked, the cells in Column A will only accept uppercase B's or S's and nothing else (no other letters, numbers, characters, etc.). HELP!? |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Here's a Custom Data Validation Formula that can allow for multiple B's and
S's. =LEN(SUBSTITUTE(SUBSTITUTE(A1,"B",""),"S",""))=0 HTH, Elkar "Mike H" wrote: Ashley, For multiple Bs & Ss I had to resort to a macro:- Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A:A")) Is Nothing Then For x = 1 To Len(Target.Value) If Mid(Target.Value, x, 1) = "B" Or Mid(Target.Value, x, 1) = "S" Then Else MsgBox ("Illegal entry, Capital B or S only") Target.Value = "" End If Next End If End Sub Mike "ashley" wrote: I need a formula that, once locked, the cells in Column A will only accept uppercase B's or S's and nothing else (no other letters, numbers, characters, etc.). HELP!? |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Nice
Peo "Elkar" wrote in message ... Here's a Custom Data Validation Formula that can allow for multiple B's and S's. =LEN(SUBSTITUTE(SUBSTITUTE(A1,"B",""),"S",""))=0 HTH, Elkar "Mike H" wrote: Ashley, For multiple Bs & Ss I had to resort to a macro:- Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A:A")) Is Nothing Then For x = 1 To Len(Target.Value) If Mid(Target.Value, x, 1) = "B" Or Mid(Target.Value, x, 1) = "S" Then Else MsgBox ("Illegal entry, Capital B or S only") Target.Value = "" End If Next End If End Sub Mike "ashley" wrote: I need a formula that, once locked, the cells in Column A will only accept uppercase B's or S's and nothing else (no other letters, numbers, characters, etc.). HELP!? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Looking for formula part 2 | Excel Discussion (Misc queries) | |||
Add one part of a formula to another | Excel Discussion (Misc queries) | |||
Change part of formula | Excel Worksheet Functions | |||
Simplifying Formula (Part 2) | Excel Discussion (Misc queries) | |||
What instead of an array formula part 2 | Excel Discussion (Misc queries) |