LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,346
Default Logical functions If, And

Hi,

Your description and your sample data don't agree. What's happening on the
5th row of data? The cost is greater than 0 but the amount paid is not = 0.
So according to your discription this should be ignored but you put in a
variance? Which way do you want it?

Suppose that the data is in cells A1:C7

The sum of the variance is =SUM(C2:C7)
The count of the variance is =COUNTIF(C2:C7,"<0")

You could also use "0" in the second one but to be on the safe side I
tested for positive or negative variances.

If on the other hand you want the sum of the variance when Cost0 and Paid=0
then
=SUMPRODUCT(--(A2:A70),--(B2:B7=0),C2:C7)
however, this can be simplified if you never have a negative cost (seems
reasonable)
=SUMIF(B2:B7,0,C2:C7)
To count the occurance you could use
=SUMPRODUCT(--(A2:A70),--(B2:B7=0))
or simplify this as above to
=COUNTIF(B2:B7,0)

if this helps, please click the Yes button

Cheers,
Shane Devenshire

"GK" wrote:

I am trying to do two things.

1). create a formula that compares one column of data to another. If the
cost is greater than zero and the amount paid is = to zero, then I want it to
sum the variances.

2). create a formula that provides the number of occurances of number 1
above. ie. how many times is ther a cost with payment made.

Here is my table:

Cost Paid Variance
250 250 0
275 0 (275)
0 0 0
175 175 0
275 55 (220)
175 0 (175)

--
Thanks,
GK

 
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
Logical Functions saltnsnails Excel Discussion (Misc queries) 5 February 19th 08 05:57 PM
Logical Functions Eden397 Excel Worksheet Functions 10 June 11th 07 04:06 PM
logical functions Ali Akbar Excel Worksheet Functions 3 February 11th 07 08:00 PM
using logical functions civilized_engr Excel Worksheet Functions 3 June 10th 06 05:41 PM
logical functions wiz546 Excel Worksheet Functions 1 February 1st 05 03:02 AM


All times are GMT +1. The time now is 08:30 AM.

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"