Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
HFWS
 
Posts: n/a
Default Sumif function, nonadjacent cells

I need to pull totals from various places on the spreadsheet, and add them if
they are less than $0.00 to get the total amount owed. Is there any way to
do this? So far, nothing I've tried has worked.

For example:
Group 1 Total is cell K12
Group 2 Total is cell K44
Group 3 Total is cell K61
Group 4 Total is cell K86

The totals change frequently, sometimes they are positive numbers and
sometimes negative numbers. I want to have them all in a function that will
add only the negative ones. Right now, I have to change my function
everytime a total changes from positive to negative and vice versa.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Sumif function, nonadjacent cells

=SUMPRODUCT(SUMIF(INDIRECT({"K12","K44","K61","K86 "}),"<0"))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"HFWS" wrote in message
...
I need to pull totals from various places on the spreadsheet, and add them

if
they are less than $0.00 to get the total amount owed. Is there any way

to
do this? So far, nothing I've tried has worked.

For example:
Group 1 Total is cell K12
Group 2 Total is cell K44
Group 3 Total is cell K61
Group 4 Total is cell K86

The totals change frequently, sometimes they are positive numbers and
sometimes negative numbers. I want to have them all in a function that

will
add only the negative ones. Right now, I have to change my function
everytime a total changes from positive to negative and vice versa.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ardus Petus
 
Posts: n/a
Default Sumif function, nonadjacent cells

AFAIK, the SUMIF formula needs a continuous array.
So, why not create a workarea (possibly hidden) in unused columns, say
L1:L4.
Put in links: in L1: "=K12", L2: "=K44", L3: "=K61" L4: = "K86"

in Grand Total cell, enter: "=SUMIF(L1:L4","<0)

HTH
--
AP

"HFWS" a écrit dans le message de
...
I need to pull totals from various places on the spreadsheet, and add them

if
they are less than $0.00 to get the total amount owed. Is there any way

to
do this? So far, nothing I've tried has worked.

For example:
Group 1 Total is cell K12
Group 2 Total is cell K44
Group 3 Total is cell K61
Group 4 Total is cell K86

The totals change frequently, sometimes they are positive numbers and
sometimes negative numbers. I want to have them all in a function that

will
add only the negative ones. Right now, I have to change my function
everytime a total changes from positive to negative and vice versa.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kevin Vaughn
 
Posts: n/a
Default Sumif function, nonadjacent cells

I'm not sure if I understand your problem well enough to give you a specific
answer, so I'll throw out a general answer instead. If it is not as simple
as testing those 4 cells, ie multiple rows are involved, you could use either
an array formula or sumproduct. A good explanation of how to use sumproduct
is at ...

http://www.xldynamic.com/source/xld.SUMPRODUCT.html

--
Kevin Vaughn


"HFWS" wrote:

I need to pull totals from various places on the spreadsheet, and add them if
they are less than $0.00 to get the total amount owed. Is there any way to
do this? So far, nothing I've tried has worked.

For example:
Group 1 Total is cell K12
Group 2 Total is cell K44
Group 3 Total is cell K61
Group 4 Total is cell K86

The totals change frequently, sometimes they are positive numbers and
sometimes negative numbers. I want to have them all in a function that will
add only the negative ones. Right now, I have to change my function
everytime a total changes from positive to negative and vice versa.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme
 
Posts: n/a
Default Sumif function, nonadjacent cells

Some alternatives
=MIN(K12,0)+MIN(K44,0)+MIN(K61,0)+MIN(K86,0)
=K12*(K12<0)+K44*(K44<0)+K61*(K61<0)+K86*(K86<0)
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email


"HFWS" wrote in message
...
I need to pull totals from various places on the spreadsheet, and add them
if
they are less than $0.00 to get the total amount owed. Is there any way
to
do this? So far, nothing I've tried has worked.

For example:
Group 1 Total is cell K12
Group 2 Total is cell K44
Group 3 Total is cell K61
Group 4 Total is cell K86

The totals change frequently, sometimes they are positive numbers and
sometimes negative numbers. I want to have them all in a function that
will
add only the negative ones. Right now, I have to change my function
everytime a total changes from positive to negative and vice versa.





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier
 
Posts: n/a
Default Sumif function, nonadjacent cells

Hi
One way
=SUM(K12*(K12<0),K44*(K44<0),K61*(K61<0),K86*(K86< 0))

--
Regards

Roger Govier


"HFWS" wrote in message
...
I need to pull totals from various places on the spreadsheet, and add
them if
they are less than $0.00 to get the total amount owed. Is there any
way to
do this? So far, nothing I've tried has worked.

For example:
Group 1 Total is cell K12
Group 2 Total is cell K44
Group 3 Total is cell K61
Group 4 Total is cell K86

The totals change frequently, sometimes they are positive numbers and
sometimes negative numbers. I want to have them all in a function
that will
add only the negative ones. Right now, I have to change my function
everytime a total changes from positive to negative and vice versa.



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
can you use countif function for noncontiguous cells rutledbr Excel Worksheet Functions 2 November 13th 05 09:15 PM
Changing worksheet cells from within a function James4U2enjoy Setting up and Configuration of Excel 1 October 14th 05 02:16 PM
How do I use the TODAY function with the SUMIF function? Lisa B. Excel Worksheet Functions 2 September 30th 05 08:51 PM
Can SUMIF function include AND function ShaneS Excel Worksheet Functions 1 May 17th 05 03:24 AM
How do I use 3 cells to create the string for a lookup function? Bencomo Excel Worksheet Functions 1 May 15th 05 07:17 AM


All times are GMT +1. The time now is 05:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"