Adding or removing one cell from a formula with a macro.

SCOTTWHITTAKER2333

New Member
Joined
Jun 1, 2010
Messages
32
I have a formula that averages a group of cells in different ways baced on certian criteria. What i need is a way to not use any of the cells in the range (F74;Y74) if they are less than the value of another cell. I could be wrong but I think the best way to do this would be with a macro.

This is the formula:
=IF(O21="lbs",IF(ISERROR(P21+SUM(F74:Y74))/COUNT(F74:Y74))*16,"",(P21+SUM(F74:Y74)/COUNT(F74:Y74))*16),IF(ISERROR(P21+SUM(F74:Y74)/COUNT(F74:Y74)),"",(P21+SUM(F74:Y74)/COUNT(F74:Y74))))
 

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Welcome to the Board.

Instead of SUM and COUNT you can use:

=SUMIF(F74:Y74,">="&A1)

=COUNTIF(F74:Y74,">="&A1)

where A1 is "another cell".
 

Forum statistics

Threads
1,085,865
Messages
5,386,416
Members
401,997
Latest member
cizwiz

Some videos you may like

This Week's Hot Topics

Top