Thread: IF function
View Single Post
  #5  
Old April 26th, 2010, 03:08 AM posted to microsoft.public.excel.worksheet.functions
FSt1
external usenet poster
 
Posts: 2,788
Default IF function

and you're right. i did test but not the right way.
also tested..
=IF(MID(B2,4,1)="m",A2,"")
=IF(FIND("M",B2,1)=4,A2,"")
i should have posted those.

thanks for the corrections.
regards
FSt1

"Dave Peterson" wrote:

The asterisks won't be treated as wildcards in that formula.

But =countif() does support wildcards:
=if(countif(b1,"*M*")=0,A1,"")

Or =find()/=search():

=if(iserror(find("M",b1)),a1,"")

=find() is case sensitive
=search() is not case sensitive



FSt1 wrote:

hi
you could use the wildcard character *.

=if(B1="*M*",A1,"")

regards
FSt1

"Lost Cluster" wrote:

I’m using the If Function to compare a string of text to a letter. This is
what I have

ColA has names ColB has the days off in this format (string of text)
Su/M/Tu-Th ColC-J have the days of the week Monday-Sunday. I want the names
of Col A to appear in Col C-J if they work those days. So the If Function
that I’m using is: =IF(B1"M",A1,"")
But it’s not working. I’m trying to say that if ColB does not equal M
(Monday) then put the name from ColA under Monday.
Thanks


--

Dave Peterson
.