Lookup

dunmore83

Well-known Member
Joined
Aug 24, 2011
Messages
540
Hi,

I'm not sure if this formula is possible, but I will explain my situation.

In cells G5:G24 are numerical figures that are both positive and negative.

I need to lookup the range G5:G24 for positive figures and divide that number by the total number of cells & return that result as a percentage.
i.e. 4 positive numbers divided by a total of 20 cells as a percentage = 20%.

Thanks so much in advance!
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
If all the cells in the desired range are numeric, try this:

=COUNTIF($G$5:$G$24,">0")/COUNT($G$5:$G$24)

HTH

Robert
 
Upvote 0
Hi,

I'm not sure if this formula is possible, but I will explain my situation.

In cells G5:G24 are numerical figures that are both positive and negative.

I need to lookup the range G5:G24 for positive figures and divide that number by the total number of cells & return that result as a percentage.
i.e. 4 positive numbers divided by a total of 20 cells as a percentage = 20%.

Thanks so much in advance!

Try...

All excel versions...

=COUNTIF(G5:G24,">0")/COUNT(G5:G24)

Excel 2007 and later...

=IFERROR(COUNTIF(G5:G24,">0")/COUNT(G5:G24),"")
 
Last edited:
Upvote 0
Is it possible to alter this formula so it only looks for numerical values that are "greater than or equal to positive" or "less than or equal to minus 20"...??


Thanks for your help!!!
 
Upvote 0
Is it possible to alter this formula so it only looks for numerical values that are "greater than or equal to positive" or "less than or equal to minus 20"...??


Thanks for your help!!!

Try...

=SUM(COUNTIF(G5:G24,{"<=-20",">0"}))/COUNT(G5:G24)

If you want -20 in a cell of its own...

J5: -20

Then:

=SUMPRODUCT((G5:G24>0)+(G5:G24<=J5))/COUNT(G5:G24)
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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