Excel Formula Question

Ford SportTrac Forum

Help Support Ford SportTrac Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

George C

Well-Known Member
Joined
Dec 30, 2002
Messages
1,413
Reaction score
0
Location
Long Island (Suffolk County), NY
Asking for help with the excel experts with an if, then formula.

Basically, if a cell has a value of 50 I need another cell to display 50. Otherwise I need the value to be an average of other cells.

Something like if(c16=50,c16), otherwise average(c16,d16,f16:v16)

That's what I want but can't figure out the correct syntax.



Can anyone help?



Thanks,

George
 
JDBoxes, you missed that he needs the average to include (F16:V16), not (F16,V16).



Therefore, the formula should be:



=IF((C16=50),C16,AVERAGE(C16,D16,F16:V16))



or



=IF((C16=50),50,AVERAGE(C16,D16,F16:V16))
 
George C, one important thing to note when using the "AVERAGE" function--it ignores empty cells.



Let's say that you have a formula taking the average of the five following cells:



5 10 15 (blank) (blank)



It will calculate the average as (5 + 10 + 15) / 3 (the number of filled cells) = 10



If you want it to calculate the average as (5 + 10 + 15 + 0 + 0) / 5 (the number of cells in the range) = 6, you need to enter zeroes in those two cells.
 
Last edited by a moderator:
Thanks everyone, I appreciate the quick help. I thought I was pretty good with excel but there are too many ( ) in that formula for me, lol.



I will also keep in mind the average issue. I didn't even think about it.



George
 

Latest posts

Top