View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default if statements with multiple returns

Try something like this:

With
A1: (the text string to test)

This formula returns the 14th and 15th characters from the string, but only
if they match either "IV" or "IP"
B1: =IF(SUM(COUNTIF(A1,REPT("?",13)&{"IV","IP"}&"*")), MID(A1,14,2),"missing")

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Batman" wrote:

Hi someone,

I'm trying to find and return specific text (the 14th and 15th character)
from a cell, but only if its one of 6 different values (ex. "ip" or "iv")

can someone provide a formula that could return only these 2 values, and i
should be ok to replicate it from there??

Thanks,