Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help needed nested conditional formula
If M6 contains "J" or "L"
if the third character in M6 is a "-" I want S6 to contain ""X" else, I want S6 to contain "Y" else, I want S6 to contain "Z". How do I write the formula? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help needed nested conditional formula
gcotterl wrote:
If M6 contains "J" or "L" if the third character in M6 is a "-" I want S6 to contain ""X" else, I want S6 to contain "Y" else, I want S6 to contain "Z". How do I write the formula? Option Explicit Sub gcotterl() Dim Check As String Check = Range("M6").Value If InStr(1, Check, "J") + InStr(1, Check, "L") 0 Then If Mid(Check, 3, 1) = "-" Then Range("S6").Value = "X" Else Range("S6").Value = "Y" End If Else Range("S6").Value = "Z" End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with nested conditional formula | Excel Discussion (Misc queries) | |||
Can system time & date be nested in conditional formula? | Excel Worksheet Functions | |||
Nested, Conditional, IF formula - fomatting disappears | Excel Worksheet Functions | |||
Nested Functions for Conditional Formatting Formula | Excel Worksheet Functions | |||
Conditional/Nested Formula | Excel Worksheet Functions |