Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 57
Default Using AND and SUMIF function together

Hello,

I have 2 columns of invoices totals like below:

Column I Column O
Original Invoice Total Amount Shortpaid
$45,679.00 ($-255.00)
$123.00 $0.00
$1,500.00 blank
blank blank

I'm trying to sum column O to give a total of what the client still owes us.
I need to:

a) Sum column O if the amounts in column O are < 0 (which means the client
has shortpd the original invoice) AND
b) Sum column I (the amount of the original invoice) if the invoice has flat
out not been paid--so sum column I if column O is blank (not been pd) AND
column I has a number in it (if the invoice exists and there's no blank
space in column I)

I tried this but I get a "FALSE" in my cell:

=AND(SUMIF(O3:O265,"<0"),SUMIF(I3:I266,AND(ISNUMBE R(I3:I266), O3:O266="")))

Can someone help with this function (no macros please)?

Thanks very much!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Using AND and SUMIF function together

Try sumproduct instead. Check out this link...

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

Jim Thomlinson


"Studebaker" wrote:

Hello,

I have 2 columns of invoices totals like below:

Column I Column O
Original Invoice Total Amount Shortpaid
$45,679.00 ($-255.00)
$123.00 $0.00
$1,500.00 blank
blank blank

I'm trying to sum column O to give a total of what the client still owes us.
I need to:

a) Sum column O if the amounts in column O are < 0 (which means the client
has shortpd the original invoice) AND
b) Sum column I (the amount of the original invoice) if the invoice has flat
out not been paid--so sum column I if column O is blank (not been pd) AND
column I has a number in it (if the invoice exists and there's no blank
space in column I)

I tried this but I get a "FALSE" in my cell:

=AND(SUMIF(O3:O265,"<0"),SUMIF(I3:I266,AND(ISNUMBE R(I3:I266), O3:O266="")))

Can someone help with this function (no macros please)?

Thanks very much!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 57
Default Using AND and SUMIF function together

I saw a post from Peo Sjoblom from 2005 where he answered someone's question
about summing a column where the last row will be changing. He gave this
formula:
=SUM($A$1:INDEX(A:A,D1)) where A1 always the first cell and D1 holds the
last row number.

Can someone also tell me how to incorporate this INDEX function to your
function in order to sum my column O which will also have the final cell in
the column vary?

Thank you for your help!


"Studebaker" wrote:

Hello,

I have 2 columns of invoices totals like below:

Column I Column O
Original Invoice Total Amount Shortpaid
$45,679.00 ($-255.00)
$123.00 $0.00
$1,500.00 blank
blank blank

I'm trying to sum column O to give a total of what the client still owes us.
I need to:

a) Sum column O if the amounts in column O are < 0 (which means the client
has shortpd the original invoice) AND
b) Sum column I (the amount of the original invoice) if the invoice has flat
out not been paid--so sum column I if column O is blank (not been pd) AND
column I has a number in it (if the invoice exists and there's no blank
space in column I)

I tried this but I get a "FALSE" in my cell:

=AND(SUMIF(O3:O265,"<0"),SUMIF(I3:I266,AND(ISNUMBE R(I3:I266), O3:O266="")))

Can someone help with this function (no macros please)?

Thanks very much!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 57
Default Using AND and SUMIF function together

Hello Jim,

I'm sorry, I read the web page you referred me to but for the most part it
got too complex for me. From what I could make out, I'm not sure SUMPRODUCT
could help (?).

I am just learning about functions and I know enough to try to create a
basic function but having trouble combining the SUMIF, AND, ISNUMBER and now
the INDEX functions.

If I could see the function then I can learn why/how certain combinations of
functions were used.

Thanks.


"Jim Thomlinson" wrote:

Try sumproduct instead. Check out this link...

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

Jim Thomlinson


"Studebaker" wrote:

Hello,

I have 2 columns of invoices totals like below:

Column I Column O
Original Invoice Total Amount Shortpaid
$45,679.00 ($-255.00)
$123.00 $0.00
$1,500.00 blank
blank blank

I'm trying to sum column O to give a total of what the client still owes us.
I need to:

a) Sum column O if the amounts in column O are < 0 (which means the client
has shortpd the original invoice) AND
b) Sum column I (the amount of the original invoice) if the invoice has flat
out not been paid--so sum column I if column O is blank (not been pd) AND
column I has a number in it (if the invoice exists and there's no blank
space in column I)

I tried this but I get a "FALSE" in my cell:

=AND(SUMIF(O3:O265,"<0"),SUMIF(I3:I266,AND(ISNUMBE R(I3:I266), O3:O266="")))

Can someone help with this function (no macros please)?

Thanks very much!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 57
Default Using AND and SUMIF function together

Jim,

I printed out the website you referred me to and studied it last night and
this morning. I was making it too difficult and I got it to work!!
Thank you for referencing this website! Though I think for someone who might
not understand functions at all, this reference is a little over their head.

Here's the answer I came up with for those who want to know. It's probably
not written as efficiently as it could be and I do get a green triangle on
the cell where my formula is that says, "The formula in this cell refers to a
range that has additional #s adjacent to it". It's not an error, per se, b/c
it does give the answer...so I just told Excel to ignore the 'error'. I'm not
sure if it will pose a problem later.

=SUMPRODUCT(-(O3:O266<0)*(O3:O266))+SUMPRODUCT((I3:I266<"")*(O 3:O266="")*(I3:I266))

The (-) negative in the beginning is a negative sign not a single unary
operator the website talks about.

For those who want to know, it takes the $ amounts (the values) in column O
that are less than 0 (i.e. negative $ amounts aka the $ amounts of the
shortpaid invoices) and makes the shortpays positive. It then adds those $
values to the $ values of the invoices in column I that: a) exist in column I
and b) have a blank in column O--i.e. those invoices that haven't been paid
by the client yet.
The way the formula is set up it doesn't multiply $ amounts like you might
think it would giving you a huge, crazy answer.

I hope someone can understand what I said and hope it helps.

Thanks, again, Jim.

"Jim Thomlinson" wrote:

Try sumproduct instead. Check out this link...

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

Jim Thomlinson


"Studebaker" wrote:

Hello,

I have 2 columns of invoices totals like below:

Column I Column O
Original Invoice Total Amount Shortpaid
$45,679.00 ($-255.00)
$123.00 $0.00
$1,500.00 blank
blank blank

I'm trying to sum column O to give a total of what the client still owes us.
I need to:

a) Sum column O if the amounts in column O are < 0 (which means the client
has shortpd the original invoice) AND
b) Sum column I (the amount of the original invoice) if the invoice has flat
out not been paid--so sum column I if column O is blank (not been pd) AND
column I has a number in it (if the invoice exists and there's no blank
space in column I)

I tried this but I get a "FALSE" in my cell:

=AND(SUMIF(O3:O265,"<0"),SUMIF(I3:I266,AND(ISNUMBE R(I3:I266), O3:O266="")))

Can someone help with this function (no macros please)?

Thanks very much!



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Using AND and SUMIF function together

I probably could have given you the answer with a bit more info from your
side. That being said you now understand sumproduct in a way that you never
would if I had just handed you the answer. On top of that you got an entire
evening's entertainment value out of it... ;-)
--
HTH...

Jim Thomlinson


"Studebaker" wrote:

Jim,

I printed out the website you referred me to and studied it last night and
this morning. I was making it too difficult and I got it to work!!
Thank you for referencing this website! Though I think for someone who might
not understand functions at all, this reference is a little over their head.

Here's the answer I came up with for those who want to know. It's probably
not written as efficiently as it could be and I do get a green triangle on
the cell where my formula is that says, "The formula in this cell refers to a
range that has additional #s adjacent to it". It's not an error, per se, b/c
it does give the answer...so I just told Excel to ignore the 'error'. I'm not
sure if it will pose a problem later.

=SUMPRODUCT(-(O3:O266<0)*(O3:O266))+SUMPRODUCT((I3:I266<"")*(O 3:O266="")*(I3:I266))

The (-) negative in the beginning is a negative sign not a single unary
operator the website talks about.

For those who want to know, it takes the $ amounts (the values) in column O
that are less than 0 (i.e. negative $ amounts aka the $ amounts of the
shortpaid invoices) and makes the shortpays positive. It then adds those $
values to the $ values of the invoices in column I that: a) exist in column I
and b) have a blank in column O--i.e. those invoices that haven't been paid
by the client yet.
The way the formula is set up it doesn't multiply $ amounts like you might
think it would giving you a huge, crazy answer.

I hope someone can understand what I said and hope it helps.

Thanks, again, Jim.

"Jim Thomlinson" wrote:

Try sumproduct instead. Check out this link...

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

Jim Thomlinson


"Studebaker" wrote:

Hello,

I have 2 columns of invoices totals like below:

Column I Column O
Original Invoice Total Amount Shortpaid
$45,679.00 ($-255.00)
$123.00 $0.00
$1,500.00 blank
blank blank

I'm trying to sum column O to give a total of what the client still owes us.
I need to:

a) Sum column O if the amounts in column O are < 0 (which means the client
has shortpd the original invoice) AND
b) Sum column I (the amount of the original invoice) if the invoice has flat
out not been paid--so sum column I if column O is blank (not been pd) AND
column I has a number in it (if the invoice exists and there's no blank
space in column I)

I tried this but I get a "FALSE" in my cell:

=AND(SUMIF(O3:O265,"<0"),SUMIF(I3:I266,AND(ISNUMBE R(I3:I266), O3:O266="")))

Can someone help with this function (no macros please)?

Thanks very much!

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
How to nest a left function within a sumif function? LisaK Excel Worksheet Functions 2 April 23rd 23 11:46 AM
Using the TODAY() function in a SUMIF function JPB Excel Worksheet Functions 4 July 27th 06 04:01 PM
How do I use the TODAY function with the SUMIF function? Lisa B. Excel Worksheet Functions 2 September 30th 05 08:51 PM
SUMIF Function Inside SUMPRODUCT Function Abdul Waheed Excel Worksheet Functions 17 September 19th 05 04:24 PM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM


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