View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Turn formula into Select

Do you mean the VB select case? if you do try this:-

Sub sonic()
mystring = Mid(Range("M4"), 2, 1)
Select Case mystring
Case Chr(48) To Chr(57)
myvalue = "Manual"
Case Is < ""
myvalue = "Auto"
Case Else
myvalue = ""
End Select
End Sub

"Hile" wrote:

Can someone turn the following formula into a select statement:
IF(ISBLANK(M4),"",IF(ISNUMBER(--MID(M4,2,1)),"Manual","Auto"))

Basically I'm tagging a record based on a value, if the second character in
the string contained in the specific column (field) is a number I want this
column to say "Manual" esle Auto and leave blank if no value.

I'm migrating this report into BI and I can't figure out how to do this in
their interface, but I can write select statement for it. It will be a
calculation based on the field containing the data.

Thanks
--
Hile