Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
external usenet poster
 
Posts: 2
Default Logical operators not working with text???

For some reason my comparison operators aren't working in my
spreadsheets and I can't figure out why. I think this worked on
another PC. What I want to do is have a row that increments a value if
the entries are the same - really simple - Lets assume all the values
in the A row are below:

A B
1 - TTTT 0
2 - TTUU Formula Below
3 - TTUU
4 - VVVV
5 - WWW
6 - WWW

In the B row I set B1 to zero and then type the following in cell 2:

=IF(A2=A1,B1+0,B1+1)

So if A2 (TTUU) is equivalent to A1 (TTTT) then don't increment, if
it's false then it's a new record so increment. The result is that the
above should put out the following in the B row - 0, 1, 1, 2, 3, 3. It
works on the first statement and everything else stays the same - 0,
1, 1, 1, 1, 1, 1, 1..

=IF(A11=A10,(B10+0),(B10+1))

Even putting the addition in parenthesis doesn't change the effect.

=IF(G2<G1,"A","B")

This always yields "A" no matter what values are in the G column. It
increments the first time and never does again. What is wrong?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
external usenet poster
 
Posts: 1,231
Default Logical operators not working with text???

Slinky <slinky_ISAT_newsguy_DOT-com wrote...
....
in the A row are below:

* * * * A * * * B
1 - * * *TTTT * *0
2 - * * TTUU * * Formula Below
3 - * * TTUU
4 - * * VVVV
5 - * * WWW
6 - * * WWW

In the B row I set B1 to zero and then type the following in cell 2:

=IF(A2=A1,B1+0,B1+1)

....

A and B are COLUMNS, not rows.

. . . the
above should put out the following in the B row - 0, 1, 1, 2, 3, 3. It
works on the first statement and everything else stays the same - 0,
1, 1, 1, 1, 1, 1, 1..


Press the [F9] key. The situation you describe is very likely due to
manual recalculation.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
external usenet poster
 
Posts: 3,440
Default Logical operators not working with text???

There may be invisible characters in one of the cells. Simplest is spaces,
but there may be others.
You can test with the LEN() function.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Slinky" <slinky_ISAT_newsguy_DOT-com wrote in message
...
For some reason my comparison operators aren't working in my
spreadsheets and I can't figure out why. I think this worked on
another PC. What I want to do is have a row that increments a value if
the entries are the same - really simple - Lets assume all the values
in the A row are below:

A B
1 - TTTT 0
2 - TTUU Formula Below
3 - TTUU
4 - VVVV
5 - WWW
6 - WWW

In the B row I set B1 to zero and then type the following in cell 2:

=IF(A2=A1,B1+0,B1+1)

So if A2 (TTUU) is equivalent to A1 (TTTT) then don't increment, if
it's false then it's a new record so increment. The result is that the
above should put out the following in the B row - 0, 1, 1, 2, 3, 3. It
works on the first statement and everything else stays the same - 0,
1, 1, 1, 1, 1, 1, 1..

=IF(A11=A10,(B10+0),(B10+1))

Even putting the addition in parenthesis doesn't change the effect.

=IF(G2<G1,"A","B")

This always yields "A" no matter what values are in the G column. It
increments the first time and never does again. What is wrong?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
external usenet poster
 
Posts: 2
Default Logical operators not working with text???

On Wed, 27 May 2009 12:57:36 -0700 (PDT), Harlan Grove
wrote:

Slinky <slinky_ISAT_newsguy_DOT-com wrote...
...
in the A row are below:

* * * * A * * * B
1 - * * *TTTT * *0
2 - * * TTUU * * Formula Below
3 - * * TTUU
4 - * * VVVV
5 - * * WWW
6 - * * WWW

In the B row I set B1 to zero and then type the following in cell 2:

=IF(A2=A1,B1+0,B1+1)

...

A and B are COLUMNS, not rows.

. . . the
above should put out the following in the B row - 0, 1, 1, 2, 3, 3. It
works on the first statement and everything else stays the same - 0,
1, 1, 1, 1, 1, 1, 1..


Press the [F9] key. The situation you describe is very likely due to
manual recalculation.


SUPER!!!! Thanks - that was the problem. Thanks for the answer and the
syntax (yep... I was so frustrated... they are columns! :) )
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
extract text from string, leaving numbers and operators CEG Excel Discussion (Misc queries) 13 March 4th 09 11:31 PM
IF STATEMENT - HOW TO STRUCTURE THE LOGICAL OPERATORS SSJ New Users to Excel 8 April 9th 07 11:15 AM
Working with logical functions beyond22 Excel Worksheet Functions 5 August 31st 06 12:34 AM
Can logical operators be used within Conditional Formatting? Rumpa Biswas Excel Discussion (Misc queries) 6 January 2nd 06 10:58 AM
Logical Text Formula Jim Excel Worksheet Functions 2 December 6th 04 10:37 PM


All times are GMT +1. The time now is 11:56 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"