Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
Default Excel insists on adding character to formula

Have a formula

What I would like: ,IF(COUNTIF(A1,"*"&{.124}&"*"),"yes"

Excel "insists on placing a zero" before the dot in front of the 124

What it changes to by pressing enter:
,IF(COUNTIF(A1,"*"&{0.124}&"*"),"yes"

I need the dot in the formula as to only check if the "124"
immediately follows the dot, and not a 124 which may occur someplace
within the cells contents. If I leave the zero in the formula, if
does not return the correct answer.

Is there a way around this apparent quirk?

Thank you.
pierre
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Excel insists on adding character to formula

What is in the cell that might precede the ".124"?

If it's a number like 1.124 then the wildcards won't work. Wildcards don't
work on numbers, they only work on text.

If it's a text string like A.124 then try this:

IF(COUNTIF(A1,"*.124*"),"yes"

The squiggly brackets { } denote an array constant. Since you're only using
a single criteria they're not needed.


--
Biff
Microsoft Excel MVP


"Pierre" wrote in message
...
Have a formula

What I would like: ,IF(COUNTIF(A1,"*"&{.124}&"*"),"yes"

Excel "insists on placing a zero" before the dot in front of the 124

What it changes to by pressing enter:
,IF(COUNTIF(A1,"*"&{0.124}&"*"),"yes"

I need the dot in the formula as to only check if the "124"
immediately follows the dot, and not a 124 which may occur someplace
within the cells contents. If I leave the zero in the formula, if
does not return the correct answer.

Is there a way around this apparent quirk?

Thank you.
pierre



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
Default Excel insists on adding character to formula

On Mar 31, 4:03*pm, "T. Valko" wrote:
What is in the cell that might precede the ".124"?

If it's a number like 1.124 then the wildcards won't work. Wildcards don't
work on numbers, they only work on text.

If it's a text string like A.124 then try this:

IF(COUNTIF(A1,"*.124*"),"yes"

The squiggly brackets { } denote an array constant. Since you're only using
a single criteria they're not needed.

--
Biff
Microsoft Excel MVP

"Pierre" wrote in message

...



Have a formula


What I would like: ,IF(COUNTIF(A1,"*"&{.124}&"*"),"yes"


Excel "insists on placing a zero" before the dot in front of the 124


What it changes to by pressing enter:
,IF(COUNTIF(A1,"*"&{0.124}&"*"),"yes"


I need the dot in the formula as to only check if the "124"
immediately follows the dot, and not a 124 which may occur someplace
within the cells contents. *If I leave the zero in the formula, if
does not return the correct answer.


Is there a way around this apparent quirk?


Thank you.
pierre- Hide quoted text -


- Show quoted text -


Makes sense. . .Thank you, I'll try it in the AM, and report back.

Pierre

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Excel insists on adding. . . Biff, it worked, but one question. . .

Since you have 2 criteria we can use the array constant again:

=IF(OR(COUNTIF(A1,"*"&{".124",".125"}&"*")),"Yes", "No")

--
Biff
Microsoft Excel MVP


"Pierre" wrote in message
...
Biff:

This did the trick; the data to be analyzed is text, and the source
data looks something like: P00345.124ELE145


As it stands, I'm at the upper limit of IF statements, and could use
one more, so I was wondering if I could combine into a single
statement searching for:
..124, and .125?

Right now, it looks like this, and works fine:
IF(COUNTIF(A4,"*.124*"),"Yes",IF(COUNTIF(A4,"*.125 *"),"Yes","")))


Would it be something like =IF(OR(COUNTIF(A4,"*.124,.125*"),"Yes"))
(It doesn't work, but I don't think it's phrased properly.

Many thanks again, for your help and feedback.

Pierre

On Mar 31, 4:03 pm, "T. Valko" wrote:
What is in the cell that might precede the ".124"?

If it's a number like 1.124 then the wildcards won't work. Wildcards don't
work on numbers, they only work on text.

If it's a text string like A.124 then try this:

IF(COUNTIF(A1,"*.124*"),"yes"

The squiggly brackets { } denote an array constant. Since you're only
using
a single criteria they're not needed.

--
Biff
Microsoft Excel MVP

"Pierre" wrote in message

...



Have a formula


What I would like: ,IF(COUNTIF(A1,"*"&{.124}&"*"),"yes"


Excel "insists on placing a zero" before the dot in front of the 124


What it changes to by pressing enter:
,IF(COUNTIF(A1,"*"&{0.124}&"*"),"yes"


I need the dot in the formula as to only check if the "124"
immediately follows the dot, and not a 124 which may occur someplace
within the cells contents. If I leave the zero in the formula, if
does not return the correct answer.


Is there a way around this apparent quirk?


Thank you.
pierre- Hide quoted text -


- Show quoted text -



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Excel insists on adding. . . Biff, it worked, but one question. . .

Or, this version which is a few keystrokes shorter:

=IF(OR(COUNTIF(A1,"*.12"&{4,5}&"*")),"Yes","No")

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Since you have 2 criteria we can use the array constant again:

=IF(OR(COUNTIF(A1,"*"&{".124",".125"}&"*")),"Yes", "No")

--
Biff
Microsoft Excel MVP


"Pierre" wrote in message
...
Biff:

This did the trick; the data to be analyzed is text, and the source
data looks something like: P00345.124ELE145


As it stands, I'm at the upper limit of IF statements, and could use
one more, so I was wondering if I could combine into a single
statement searching for:
.124, and .125?

Right now, it looks like this, and works fine:
IF(COUNTIF(A4,"*.124*"),"Yes",IF(COUNTIF(A4,"*.125 *"),"Yes","")))


Would it be something like =IF(OR(COUNTIF(A4,"*.124,.125*"),"Yes"))
(It doesn't work, but I don't think it's phrased properly.

Many thanks again, for your help and feedback.

Pierre

On Mar 31, 4:03 pm, "T. Valko" wrote:
What is in the cell that might precede the ".124"?

If it's a number like 1.124 then the wildcards won't work. Wildcards
don't
work on numbers, they only work on text.

If it's a text string like A.124 then try this:

IF(COUNTIF(A1,"*.124*"),"yes"

The squiggly brackets { } denote an array constant. Since you're only
using
a single criteria they're not needed.

--
Biff
Microsoft Excel MVP

"Pierre" wrote in message

...



Have a formula


What I would like: ,IF(COUNTIF(A1,"*"&{.124}&"*"),"yes"


Excel "insists on placing a zero" before the dot in front of the 124


What it changes to by pressing enter:
,IF(COUNTIF(A1,"*"&{0.124}&"*"),"yes"


I need the dot in the formula as to only check if the "124"
immediately follows the dot, and not a 124 which may occur someplace
within the cells contents. If I leave the zero in the formula, if
does not return the correct answer.


Is there a way around this apparent quirk?


Thank you.
pierre- Hide quoted text -


- Show quoted text -







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Excel insists on adding. . . Biff, it worked, but one question. . .

Now, where do you wnat those pizzas sent?

Make 'em with thick crust, mushrooms, peppers, tomatoes and xtra cheese!

Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Pierre" wrote in message
...
Awesome!!!

Now, where do you wnat those pizzas sent?

Pierre

On Apr 1, 12:08 pm, "T. Valko" wrote:
Or, this version which is a few keystrokes shorter:

=IF(OR(COUNTIF(A1,"*.12"&{4,5}&"*")),"Yes","No")

--
Biff
Microsoft Excel MVP

"T. Valko" wrote in message

...



Since you have 2 criteria we can use the array constant again:


=IF(OR(COUNTIF(A1,"*"&{".124",".125"}&"*")),"Yes", "No")


--
Biff
Microsoft Excel MVP


"Pierre" wrote in message
...
Biff:


This did the trick; the data to be analyzed is text, and the source
data looks something like: P00345.124ELE145


As it stands, I'm at the upper limit of IF statements, and could use
one more, so I was wondering if I could combine into a single
statement searching for:
.124, and .125?


Right now, it looks like this, and works fine:
IF(COUNTIF(A4,"*.124*"),"Yes",IF(COUNTIF(A4,"*.125 *"),"Yes","")))


Would it be something like =IF(OR(COUNTIF(A4,"*.124,.125*"),"Yes"))
(It doesn't work, but I don't think it's phrased properly.


Many thanks again, for your help and feedback.


Pierre


On Mar 31, 4:03 pm, "T. Valko" wrote:
What is in the cell that might precede the ".124"?


If it's a number like 1.124 then the wildcards won't work. Wildcards
don't
work on numbers, they only work on text.


If it's a text string like A.124 then try this:


IF(COUNTIF(A1,"*.124*"),"yes"


The squiggly brackets { } denote an array constant. Since you're only
using
a single criteria they're not needed.


--
Biff
Microsoft Excel MVP


"Pierre" wrote in message


...


Have a formula


What I would like: ,IF(COUNTIF(A1,"*"&{.124}&"*"),"yes"


Excel "insists on placing a zero" before the dot in front of the 124


What it changes to by pressing enter:
,IF(COUNTIF(A1,"*"&{0.124}&"*"),"yes"


I need the dot in the formula as to only check if the "124"
immediately follows the dot, and not a 124 which may occur someplace
within the cells contents. If I leave the zero in the formula, if
does not return the correct answer.


Is there a way around this apparent quirk?


Thank you.
pierre- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -



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
adding up a particular character in a row rkalabokes Excel Discussion (Misc queries) 3 May 9th 07 04:53 PM
Adding a character to a defined name with a formula or macro InfinityDesigns Excel Discussion (Misc queries) 20 June 24th 05 06:36 AM
Excel 2000 insists on typing a formula Mr.PC Excel Discussion (Misc queries) 4 April 19th 05 05:02 PM
Adding overscore to character in a cell in an Excell spreadsheet DrJoe Excel Discussion (Misc queries) 0 March 30th 05 04:47 PM
Adding a character to the beginning and end of txt in a cell Duracell Bunnies Excel Worksheet Functions 1 March 18th 05 06:27 PM


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

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"