Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How do I use an If= statement with an apostrophe (IF(s4="jack's",.

I need to set a new cell's value to a numeric digit by saying :
If(s4="Jack's", 1, ""). But it won't work b/c of the apostrophe inside of
"Jack's".

Is there a way around this without altering the data?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,080
Default How do I use an If= statement with an apostrophe (IF(s4="jack's",.

It works for me.
__________________________________________________ ______________________

"Denver Tiffany" <Denver wrote in message
...
I need to set a new cell's value to a numeric digit by saying :
If(s4="Jack's", 1, ""). But it won't work b/c of the apostrophe inside of
"Jack's".

Is there a way around this without altering the data?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 349
Default How do I use an If= statement with an apostrophe (IF(s4="jack's",.

Make sure there are not extra spaces before or after Jack's. In Excel 2007,
I typed Jack's in one cell and added =IF(D4="Jack's",1,"") and I am getting a
1. If I add one empty space after 's I then get blank.
--
Peter


"Denver Tiffany" wrote:

I need to set a new cell's value to a numeric digit by saying :
If(s4="Jack's", 1, ""). But it won't work b/c of the apostrophe inside of
"Jack's".

Is there a way around this without altering the data?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default How do I use an If= statement with an apostrophe (IF(s4="jack's",.

Tiffany,

=IF(S4="Jack's",1,"")

worked fine for me.

Try

=IF(TRIM(S4)="Jack's",1,"")

You may have extra spaces.... Otherwise, try retyping Jack's into cell S4

HTH,
Bernie
MS Excel MVP


"Denver Tiffany" <Denver wrote in message
...
I need to set a new cell's value to a numeric digit by saying :
If(s4="Jack's", 1, ""). But it won't work b/c of the apostrophe inside of
"Jack's".

Is there a way around this without altering the data?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default How do I use an If= statement with an apostrophe (IF(s4="jack's",.

The apostrophe does not cause a problem in this formula. Since it is in
between the two double-quotes, it will be read as part of the text string.

Does your data in S4 include the quotes? If so, that is where the problem
lies. Try writing your formula like this instead:

=IF(S4="""Jack's""",1,"")

HTH,
Elkar


"Denver Tiffany" wrote:

I need to set a new cell's value to a numeric digit by saying :
If(s4="Jack's", 1, ""). But it won't work b/c of the apostrophe inside of
"Jack's".

Is there a way around this without altering the data?



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default How do I use an If= statement with an apostrophe (IF(s4="jack's",.

The formulas below are much flexible. They will work with a word name Jack.
Example: "Jack ", " jack ", "Jack's", "Hello Jack", and so on....

=IF(ISNUMBER(SEARCH("Jack",A1)),1,"")
or
=IF(COUNTIF(A1,"*Jack*"),1,"")


"Denver Tiffany" wrote:

I need to set a new cell's value to a numeric digit by saying :
If(s4="Jack's", 1, ""). But it won't work b/c of the apostrophe inside of
"Jack's".

Is there a way around this without altering the data?

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
embedding "ISERROR" function into an "IF" statement [email protected] Excel Worksheet Functions 8 January 4th 07 12:01 AM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
"IF" statement & "strikethrough" formatting jijy Excel Worksheet Functions 3 March 22nd 06 06:56 PM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM


All times are GMT +1. The time now is 02:51 PM.

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

About Us

"It's about Microsoft Excel"