#1   Report Post  
Matt
 
Posts: n/a
Default If and Or statement

I am having trouble creating an If and Or statement:
My spreadsheet looks like this:
A1 100
A2 200
A3 300
A4 600

A4 is just a sum of the 3 cells above it. I want to say if any of the cells
above the total line is negative then dont add that particular cell. I can do
it if one cell is negative but what about 2?
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=SUM(IF(A1:A40,A1:A4)

which is an array formula, so commit with Ctrl-Shift-Enter.

--
HTH

Bob Phillips

"Matt" wrote in message
...
I am having trouble creating an If and Or statement:
My spreadsheet looks like this:
A1 100
A2 200
A3 300
A4 600

A4 is just a sum of the 3 cells above it. I want to say if any of the

cells
above the total line is negative then dont add that particular cell. I can

do
it if one cell is negative but what about 2?



  #3   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Wed, 29 Jun 2005 07:31:11 -0700, "Matt"
wrote:

I am having trouble creating an If and Or statement:
My spreadsheet looks like this:
A1 100
A2 200
A3 300
A4 600

A4 is just a sum of the 3 cells above it. I want to say if any of the cells
above the total line is negative then dont add that particular cell. I can do
it if one cell is negative but what about 2?


=SUMIF(A1:A3,"0")




--ron
  #4   Report Post  
RagDyeR
 
Posts: n/a
Default

How about plain, old:

=SUMIF(A1:A4,"0")

???
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"Bob Phillips" wrote in message
...
=SUM(IF(A1:A40,A1:A4)

which is an array formula, so commit with Ctrl-Shift-Enter.

--
HTH

Bob Phillips

"Matt" wrote in message
...
I am having trouble creating an If and Or statement:
My spreadsheet looks like this:
A1 100
A2 200
A3 300
A4 600

A4 is just a sum of the 3 cells above it. I want to say if any of the

cells
above the total line is negative then dont add that particular cell. I can

do
it if one cell is negative but what about 2?




  #5   Report Post  
Bob Phillips
 
Posts: n/a
Default

Oh don't be so boring :-)

--
HTH

Bob Phillips

"RagDyeR" wrote in message
...
How about plain, old:

=SUMIF(A1:A4,"0")

???
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"Bob Phillips" wrote in message
...
=SUM(IF(A1:A40,A1:A4)

which is an array formula, so commit with Ctrl-Shift-Enter.

--
HTH

Bob Phillips

"Matt" wrote in message
...
I am having trouble creating an If and Or statement:
My spreadsheet looks like this:
A1 100
A2 200
A3 300
A4 600

A4 is just a sum of the 3 cells above it. I want to say if any of the

cells
above the total line is negative then dont add that particular cell. I

can
do
it if one cell is negative but what about 2?






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
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM
IF Statement nightmare eugenevr Excel Discussion (Misc queries) 6 May 18th 05 01:09 PM
IF Statement Brent New Users to Excel 3 April 29th 05 04:24 PM
How do I fix a circular reference in a financial statement? drjayhawk25 Excel Discussion (Misc queries) 0 February 7th 05 05:19 PM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM


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