A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IF function



 
 
Thread Tools Display Modes
  #1  
Old April 26th, 2010, 12:52 AM posted to microsoft.public.excel.worksheet.functions
Lost Cluster
external usenet poster
 
Posts: 11
Default IF function

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

Ads
  #2  
Old April 26th, 2010, 02:02 AM posted to microsoft.public.excel.worksheet.functions
FSt1
external usenet poster
 
Posts: 2,788
Default IF function

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

  #3  
Old April 26th, 2010, 02:17 AM posted to microsoft.public.excel.worksheet.functions
Dave Peterson
external usenet poster
 
Posts: 19,791
Default IF function

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
  #4  
Old April 26th, 2010, 02:46 AM posted to microsoft.public.excel.worksheet.functions
MS-Exl-Learner
external usenet poster
 
Posts: 135
Default IF function

Not sure whether this is what you are looking for…

If the First Character of B1 M
=IF(TRIM(LEFT(B1,1))"M",A1,"")

Or

If you want to look B1 cell whether its having the character M in any case
(Upper or Lower)
=IF(ISNUMBER(SEARCH("M",B1))=FALSE,A1,"")

Or

If you want to look B1 cell whether its having the character M only in upper
case.
=IF(ISNUMBER(FIND("M",B1))=FALSE,A1,"")

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"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

  #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
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 OfficeFrustration.
The comments are property of their posters.