Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CES CES is offline
external usenet poster
 
Posts: 2
Default Array function - I think!

I am trying to get a formula to return a number if two other cells have
values. Column X might have a number or a letter; Column Y will have a
number. For a particular line, if there is something in Column X and Column
Y, I want it to return the value of the number in column Y. I can do this
with a simple IF function, but the problem I'm having is that I need the cell
to add the value of every line where there is something in Column X and
Column Y. I tried making an array formula but it did not work:
=SUM((ISLOGICAL(H20:H403))*(ISLOGICAL (M20:M403))*(M20:M403))
Help!

Cynthia

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default Array function - I think!

Hi,

=sumproduct(($X$1:$X$1000<""),($Y$1:$Y$1000<""), $Y$1:$Y$1000)

"CES" wrote:

I am trying to get a formula to return a number if two other cells have
values. Column X might have a number or a letter; Column Y will have a
number. For a particular line, if there is something in Column X and Column
Y, I want it to return the value of the number in column Y. I can do this
with a simple IF function, but the problem I'm having is that I need the cell
to add the value of every line where there is something in Column X and
Column Y. I tried making an array formula but it did not work:
=SUM((ISLOGICAL(H20:H403))*(ISLOGICAL (M20:M403))*(M20:M403))
Help!

Cynthia

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default Array function - I think!

OOpps, use this formula instead

=SUMPRODUCT(--($X$1:$X$1000<""),--($Y$1:$Y$1000<""),$Y$1:$Y$1000)

"CES" wrote:

I am trying to get a formula to return a number if two other cells have
values. Column X might have a number or a letter; Column Y will have a
number. For a particular line, if there is something in Column X and Column
Y, I want it to return the value of the number in column Y. I can do this
with a simple IF function, but the problem I'm having is that I need the cell
to add the value of every line where there is something in Column X and
Column Y. I tried making an array formula but it did not work:
=SUM((ISLOGICAL(H20:H403))*(ISLOGICAL (M20:M403))*(M20:M403))
Help!

Cynthia

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Array function - I think!

See if this does what you want...

=SUMIF(H20:H403,"<",M20:M403)

--
Biff
Microsoft Excel MVP


"CES" wrote in message
...
I am trying to get a formula to return a number if two other cells have
values. Column X might have a number or a letter; Column Y will have a
number. For a particular line, if there is something in Column X and
Column
Y, I want it to return the value of the number in column Y. I can do this
with a simple IF function, but the problem I'm having is that I need the
cell
to add the value of every line where there is something in Column X and
Column Y. I tried making an array formula but it did not work:
=SUM((ISLOGICAL(H20:H403))*(ISLOGICAL (M20:M403))*(M20:M403))
Help!

Cynthia



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Array function - I think!


Here is an array formula that works.

Data

100 300
100 300
100 300
100
100
100
100
100 300
100 300

500 Result

{=SUM((I12:I20 <"")*(J12:J20<"")*I12:I20)}

Enter as Array with Ctrl-Shift-Enter

Siegfried



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CES CES is offline
external usenet poster
 
Posts: 2
Default Array function - I think!

Yes - thanks so much! Simple and direct and better than me creating over 400
IF functions for a cell (which is what I was doing).

Cynthia

"T. Valko" wrote:

See if this does what you want...

=SUMIF(H20:H403,"<",M20:M403)

--
Biff
Microsoft Excel MVP


"CES" wrote in message
...
I am trying to get a formula to return a number if two other cells have
values. Column X might have a number or a letter; Column Y will have a
number. For a particular line, if there is something in Column X and
Column
Y, I want it to return the value of the number in column Y. I can do this
with a simple IF function, but the problem I'm having is that I need the
cell
to add the value of every line where there is something in Column X and
Column Y. I tried making an array formula but it did not work:
=SUM((ISLOGICAL(H20:H403))*(ISLOGICAL (M20:M403))*(M20:M403))
Help!

Cynthia



.

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Array function - I think!

{=SUM((I12:I20 <"")*(J12:J20<"")*I12:I20)}

Why test for I12:I20 <"" ?

If a cell in col I is empty it will evaluate as 0:

0*(J12<"")*I12 = 0

=SUM((J12:J20<"")*I12:I20)

--
Biff
Microsoft Excel MVP


"Ziggy" wrote in message
...

Here is an array formula that works.

Data

100 300
100 300
100 300
100
100
100
100
100 300
100 300

500 Result

{=SUM((I12:I20 <"")*(J12:J20<"")*I12:I20)}

Enter as Array with Ctrl-Shift-Enter

Siegfried



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Array function - I think!

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"CES" wrote in message
...
Yes - thanks so much! Simple and direct and better than me creating over
400
IF functions for a cell (which is what I was doing).

Cynthia

"T. Valko" wrote:

See if this does what you want...

=SUMIF(H20:H403,"<",M20:M403)

--
Biff
Microsoft Excel MVP


"CES" wrote in message
...
I am trying to get a formula to return a number if two other cells have
values. Column X might have a number or a letter; Column Y will have a
number. For a particular line, if there is something in Column X and
Column
Y, I want it to return the value of the number in column Y. I can do
this
with a simple IF function, but the problem I'm having is that I need
the
cell
to add the value of every line where there is something in Column X and
Column Y. I tried making an array formula but it did not work:
=SUM((ISLOGICAL(H20:H403))*(ISLOGICAL (M20:M403))*(M20:M403))
Help!

Cynthia



.



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Array function - I think!

On Mar 30, 10:54*am, "T. Valko" wrote:
{=SUM((I12:I20 <"")*(J12:J20<"")*I12:I20)}


Why test for I12:I20 <"" ?

If a cell in col I is empty it will evaluate as 0:

0*(J12<"")*I12 = 0

=SUM((J12:J20<"")*I12:I20)

--
Biff
Microsoft Excel MVP


You're right. Old habits are hard to break.

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
Array Function? Johnnie[_2_] Excel Worksheet Functions 4 July 21st 09 08:38 PM
OR function in array-entered IF function veggies27 Excel Worksheet Functions 8 March 11th 08 06:32 PM
AND in an array function? Vince Excel Worksheet Functions 2 April 17th 06 05:46 PM
Is there an array function or something like it? nyys Excel Worksheet Functions 0 January 12th 06 07:47 PM
Array Function N Harkawat Excel Worksheet Functions 9 July 18th 05 11:14 PM


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