Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Formula helper gives correct answer but the cell content is differ

I've seen this many times but now I'm really desperate. Here's the formula
- not that it matters I think - I'm hoping there is a principle that applies
regardless of the funtion.
=SUM(IF(G3:G22="DUP",1,IF(G3:G22="NE",1,0)))

In the helper window I see the formula correctly identifies one condition
where the range contains "DUP" and 3 cases where it finds "NE" and shows a
result of 4.

However the value that displays as a result of this formula is zero. How
can I get the right answer to appear in the cell ????

Thanks,
sb



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Formula helper gives correct answer but the cell content is differ

Did you remember to enter it as an array formula (Control Shift Enter)? If
you forget that, it will give zero.
--
David Biddulph

"stebro" wrote in message
...
I've seen this many times but now I'm really desperate. Here's the
formula
- not that it matters I think - I'm hoping there is a principle that
applies
regardless of the funtion.
=SUM(IF(G3:G22="DUP",1,IF(G3:G22="NE",1,0)))

In the helper window I see the formula correctly identifies one condition
where the range contains "DUP" and 3 cases where it finds "NE" and shows a
result of 4.

However the value that displays as a result of this formula is zero. How
can I get the right answer to appear in the cell ????

Thanks,
sb





  #4   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default Formula helper gives correct answer but the cell content is differ

This is an array formula and must be entered with control-shift-enter
just using enter will only look at G3

"stebro" wrote:

I've seen this many times but now I'm really desperate. Here's the formula
- not that it matters I think - I'm hoping there is a principle that applies
regardless of the funtion.
=SUM(IF(G3:G22="DUP",1,IF(G3:G22="NE",1,0)))

In the helper window I see the formula correctly identifies one condition
where the range contains "DUP" and 3 cases where it finds "NE" and shows a
result of 4.

However the value that displays as a result of this formula is zero. How
can I get the right answer to appear in the cell ????

Thanks,
sb



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Formula helper gives correct answer but the cell content is differ

I'm hoping there is a principle that applies
regardless of the funtion


There is. That principle is arrays. The formula you posted is an array
formula. An array formula needs to be entered with a combination of keys.
Those keys are CTRL,SHIFT,ENTER. That is, hold down both the CTRL and SHIFT
keys then hit ENTER. If done properly Excel will enclose the formula in
squiggly brackets: { }

{=SUM(IF(G3:G22="DUP",1,IF(G3:G22="NE",1,0)))}

The squiggly brackets denote an array. In this case the entire formula is
the array. You can't just type these brackets in. You *must* use the key
combo. Also, anytime you edit an array formula it must be re-entered as an
array using the key combo.

Here's another way to write that formula that contains an array *but is not
an array formula*:

=SUM(COUNTIF(G3:G22,{"DUP","NE"}))

Note that the array is within the formula. This type of array is called an
array constant, an array of constant values.

Yet another way to write that formula:

=COUNTIF(G3:G22,"DUP")+COUNTIF(G3:G22,"NE")

Biff

"stebro" wrote in message
...
I've seen this many times but now I'm really desperate. Here's the
formula
- not that it matters I think - I'm hoping there is a principle that
applies
regardless of the funtion.
=SUM(IF(G3:G22="DUP",1,IF(G3:G22="NE",1,0)))

In the helper window I see the formula correctly identifies one condition
where the range contains "DUP" and 3 cases where it finds "NE" and shows a
result of 4.

However the value that displays as a result of this formula is zero. How
can I get the right answer to appear in the cell ????

Thanks,
sb







  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Formula helper gives correct answer but the cell content is di

Thanks all - this is it.
-sb


"bj" wrote:

This is an array formula and must be entered with control-shift-enter
just using enter will only look at G3

"stebro" wrote:

I've seen this many times but now I'm really desperate. Here's the formula
- not that it matters I think - I'm hoping there is a principle that applies
regardless of the funtion.
=SUM(IF(G3:G22="DUP",1,IF(G3:G22="NE",1,0)))

In the helper window I see the formula correctly identifies one condition
where the range contains "DUP" and 3 cases where it finds "NE" and shows a
result of 4.

However the value that displays as a result of this formula is zero. How
can I get the right answer to appear in the cell ????

Thanks,
sb



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Formula helper gives correct answer but the cell content is differ

If you forget that, it will give zero.

Depends on where the formula is physically located.

http://img86.imageshack.us/img86/6425/arrayjr3.jpg

Biff

"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
Did you remember to enter it as an array formula (Control Shift Enter)?
If you forget that, it will give zero.
--
David Biddulph

"stebro" wrote in message
...
I've seen this many times but now I'm really desperate. Here's the
formula
- not that it matters I think - I'm hoping there is a principle that
applies
regardless of the funtion.
=SUM(IF(G3:G22="DUP",1,IF(G3:G22="NE",1,0)))

In the helper window I see the formula correctly identifies one condition
where the range contains "DUP" and 3 cases where it finds "NE" and shows
a
result of 4.

However the value that displays as a result of this formula is zero.
How
can I get the right answer to appear in the cell ????

Thanks,
sb







  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Formula helper gives correct answer but the cell content is differ

or NON array entered
=SUMPRODUCT((G3:G22={"dup","ne"})*1)

--
Don Guillett
SalesAid Software

"T. Valko" wrote in message
...
I'm hoping there is a principle that applies
regardless of the funtion


There is. That principle is arrays. The formula you posted is an array
formula. An array formula needs to be entered with a combination of keys.
Those keys are CTRL,SHIFT,ENTER. That is, hold down both the CTRL and
SHIFT keys then hit ENTER. If done properly Excel will enclose the formula
in squiggly brackets: { }

{=SUM(IF(G3:G22="DUP",1,IF(G3:G22="NE",1,0)))}

The squiggly brackets denote an array. In this case the entire formula is
the array. You can't just type these brackets in. You *must* use the key
combo. Also, anytime you edit an array formula it must be re-entered as an
array using the key combo.

Here's another way to write that formula that contains an array *but is
not an array formula*:

=SUM(COUNTIF(G3:G22,{"DUP","NE"}))

Note that the array is within the formula. This type of array is called an
array constant, an array of constant values.

Yet another way to write that formula:

=COUNTIF(G3:G22,"DUP")+COUNTIF(G3:G22,"NE")

Biff

"stebro" wrote in message
...
I've seen this many times but now I'm really desperate. Here's the
formula
- not that it matters I think - I'm hoping there is a principle that
applies
regardless of the funtion.
=SUM(IF(G3:G22="DUP",1,IF(G3:G22="NE",1,0)))

In the helper window I see the formula correctly identifies one condition
where the range contains "DUP" and 3 cases where it finds "NE" and shows
a
result of 4.

However the value that displays as a result of this formula is zero.
How
can I get the right answer to appear in the cell ????

Thanks,
sb







  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default Formula helper gives correct answer but the cell content is differ

=SUM(COUNTIF(G3:G22,{"DUP","NE"}))


"stebro" wrote:

I've seen this many times but now I'm really desperate. Here's the formula
- not that it matters I think - I'm hoping there is a principle that applies
regardless of the funtion.
=SUM(IF(G3:G22="DUP",1,IF(G3:G22="NE",1,0)))

In the helper window I see the formula correctly identifies one condition
where the range contains "DUP" and 3 cases where it finds "NE" and shows a
result of 4.

However the value that displays as a result of this formula is zero. How
can I get the right answer to appear in the cell ????

Thanks,
sb



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
add up cell content to get answer at bottom of sheet Robert Excel Discussion (Misc queries) 1 July 11th 06 11:31 PM
Fill down produces correct formula but wrong answer Jim at SDSU Excel Worksheet Functions 2 March 3rd 06 07:03 PM
Formula correct, answer wrong TJAC Excel Discussion (Misc queries) 2 January 3rd 06 06:15 PM
Cond Format & helper-cell based "duplicate rec" tricked by content Dennis Excel Discussion (Misc queries) 3 December 16th 05 06:55 PM
Formula window displays correct answer while cell displays incorre MMV Excel Worksheet Functions 3 November 10th 04 09:28 PM


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