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

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
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,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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