Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
extract text from string, leaving numbers and operators | Excel Discussion (Misc queries) | |||
IF STATEMENT - HOW TO STRUCTURE THE LOGICAL OPERATORS | New Users to Excel | |||
Working with logical functions | Excel Worksheet Functions | |||
Can logical operators be used within Conditional Formatting? | Excel Discussion (Misc queries) | |||
Logical Text Formula | Excel Worksheet Functions |