#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default IF function

Im 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 Im using is: =IF(B1<"M",A1,"")
But its not working. Im trying to say that if ColB does not equal M
(Monday) then put the name from ColA under Monday.
Thanks

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default IF function

hi
you could use the wildcard character *.

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

regards
FSt1

"Lost Cluster" wrote:

Im 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 Im using is: =IF(B1<"M",A1,"")
But its not working. Im trying to say that if ColB does not equal M
(Monday) then put the name from ColA under Monday.
Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
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:

Im 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 Im using is: =IF(B1<"M",A1,"")
But its not working. Im trying to say that if ColB does not equal M
(Monday) then put the name from ColA under Monday.
Thanks


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
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
.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 132
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:

Im 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 Im using is: =IF(B1<"M",A1,"")
But its not working. Im trying to say that if ColB does not equal M
(Monday) then put the name from ColA under Monday.
Thanks



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Data Validation/Lookup function does function correcty Kirkey Excel Worksheet Functions 2 May 25th 09 09:22 PM
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM


All times are GMT +1. The time now is 12:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"