View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default second character from the right

As Steve pointed out, but not in the thread for some reason, there was a
typo in the second formula;

=IF(LEFT(RIGHT(A2,1),1)<="L","Call","Put")

should be

=IF(LEFT(RIGHT(A2,2),1)<="L","Call","Put")

--
Regards,
Tom Ogilvy

Tom Ogilvy wrote in message
...
in C2 put in the formula

=TEXT(DATE(2003,CODE(LEFT(RIGHT(A2,1),1))-64,1),"mmm")


in D2:

=IF(LEFT(RIGHT(A2,1),1)<="L","Call","Put")


--
Regards,
Tom Ogilvy


"_______Tim_______" wrote in message
...
Hi,

If I have Stock Option Symbol "QTHHF" in A2 and the rule
is the second character from the right "H" tells me that
the Option expires in August and is a Call, how can I
write a macro to insert the month in column C and the Call
or Putt in column D?

Month Call Put
Jan A M
Feb B N
Mar C O
Apr D P
May E Q
Jun F R
Jul G S
Aug H T
Sep I U
Oct J V
Nov K W
Dec L X

Second from right.

Thank you for your help.

Regards, Tim