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))))
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
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".
 
Upvote 0

Forum statistics

Threads
1,215,018
Messages
6,122,703
Members
449,093
Latest member
Mnur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top