View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default function for looking up text

Hi,

Apart from a small (I assume) typo Slot3 Slot 3 I can see nothing wrong with
it. If you call it with:-

=PreTimeSlotsConv18(A1)

If A1 contains Slot 1 it returns the text string 17:35. Is that what you
want it to do?

Mike


"Kathl" wrote:

hi, don't know what's wrong with this function. it shall take the value of a
cell and via select case look, whats in it and write into the active cell a
certain text.

Function PreTimeSlotsConv18(PreSlot18)
Select Case PreSlot18
Case "Slot 1"
PreTimeSlotsConv18 = "17:35"
Case "Slot 2"
PreTimeSlotsConv18 = "17:20"
Case "Slot3"
PreTimeSlotsConv18 = "17:05"
End Select
End Function

cheers