×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# AVERAGEIF question for Excel Experts2

## AVERAGEIF question for Excel Experts

(OP)
Hello all,

I think what I'm trying to do is pretty straight forward, but I'm no excel expert (sadly).

I have three columns, I want the average of the contents, depending on how many columns are greater than zero.
So, if two of the three cells are greater than 0, I want to divide by 2. If only one of the three cells is greater than zero, then divide by 1. And if all three cells are greater than zero, divide by 3.

cell 1 cell 2 cell 3 formula result
4,524.69 1,047.38 875.61 2,149.23
1,293.62 577.08 0 935.34
0 612.02 0 612.02

Any help would be greatly appreciated!

-TS

### RE: AVERAGEIF question for Excel Experts

2
   A           B          C         D
cell 1	   cell 2	cell 3   Formula
4,524.69   1,047.38	875.61   =AVERAGEIF(A2:C2, "<>0")
1,293.62     577.08	0        =AVERAGEIF(A3:C3, "<>0")
0	     612.02	0        =AVERAGEIF(A4:C4, "<>0") 

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson

### RE: AVERAGEIF question for Excel Experts

(OP)
Perfect! Exactly what I was looking for.
Thanks, Andrzejek!

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!