Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ch
 
Posts: n/a
Default Unable to excecute formula

I tried to use functions and had an instant when I type in :

=if(or(A3=A2,A3=A4),1,0)

Excel instead of executing the function and does the comparison, displays
the exact words as above.

How can I get Excel to perform the function as I had wanted?
  #2   Report Post  
JulieD
 
Posts: n/a
Default

Hi

check tools / options / view tab and ensure that formulas is unticked
it might also be that the cell is formatted to text, choose a blank unused
cell somewhere and copy it, then click on your cell, choose edit / paste
special - ADD. You might then still need to click on the cell press the F2
key and then press enter for it to behave.

Cheers
JulieD

"ch" wrote in message
...
I tried to use functions and had an instant when I type in :

=if(or(A3=A2,A3=A4),1,0)

Excel instead of executing the function and does the comparison, displays
the exact words as above.

How can I get Excel to perform the function as I had wanted?



  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

When you entered your function, the cell was formatted as Text, so
that's how XL's parser interpreted it. Change the format and re-enter it.

FWIW, your formula could be a bit shorter by using XL's implicit
coercion of TRUE/FALSE to 1/0 in a math operation:

= --OR(A3=A2,A3=A4)

where the first - is used to coerce TRUE/FALSE to -1/0, then the second
- negates the result of the first.

Alternatively:

=(A3=A2)+(A3=A4)

but the -- is somewhat more efficient.


In article ,
"ch" wrote:

I tried to use functions and had an instant when I type in :

=if(or(A3=A2,A3=A4),1,0)

Excel instead of executing the function and does the comparison, displays
the exact words as above.

How can I get Excel to perform the function as I had wanted?

  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Disregard the last - it will return 2 if all three are equivalent.

In article ,
JE McGimpsey wrote:

When you entered your function, the cell was formatted as Text, so
that's how XL's parser interpreted it. Change the format and re-enter it.

FWIW, your formula could be a bit shorter by using XL's implicit
coercion of TRUE/FALSE to 1/0 in a math operation:

= --OR(A3=A2,A3=A4)

where the first - is used to coerce TRUE/FALSE to -1/0, then the second
- negates the result of the first.

Alternatively:

=(A3=A2)+(A3=A4)

but the -- is somewhat more efficient.

  #5   Report Post  
ch
 
Posts: n/a
Default

Thanks JE, Julie,

I changed the text format to number format and it works !!

"JE McGimpsey" wrote:

Disregard the last - it will return 2 if all three are equivalent.

In article ,
JE McGimpsey wrote:

When you entered your function, the cell was formatted as Text, so
that's how XL's parser interpreted it. Change the format and re-enter it.

FWIW, your formula could be a bit shorter by using XL's implicit
coercion of TRUE/FALSE to 1/0 in a math operation:

= --OR(A3=A2,A3=A4)

where the first - is used to coerce TRUE/FALSE to -1/0, then the second
- negates the result of the first.

Alternatively:

=(A3=A2)+(A3=A4)

but the -- is somewhat more efficient.


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
cell reference in a formula is called ??????????? Excel Discussion (Misc queries) 2 April 22nd 23 09:02 AM
formula help Bill H. Charts and Charting in Excel 2 January 2nd 05 05:26 AM
Data Label Value in Formula? Phil Hageman Charts and Charting in Excel 2 December 30th 04 05:07 PM
create a chart with a formula anon Charts and Charting in Excel 1 December 15th 04 08:55 PM
formula for doing Smith Jhon to Jhon Smith ? anandat Excel Discussion (Misc queries) 3 November 27th 04 03:42 PM


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