Help with excel calculation

lostboyca

Board Regular
Joined
Nov 2, 2005
Messages
62
Please help me figure this calculation out Please go to http://www.diversityrus.com/help.zip for the file

% Comp. (H10) = I need to do a calculation such as: IF there is text in a cell J11:O26 count each cell as one THEN DIVIDE by the number of cells in J11:O26 which will give me the percentage.

This will be the start but there are more calculations but this will help me start it out.

Thanks


lostboyca
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
=(COUNTA(J11:O26)+COUNTBLANK(J11:O26)) will give total
to get the percentage use the first formula then divide
like this
=COUNTA(J11:O26)/(COUNTA(J11:O26)+COUNTBLANK(J11:O26))
 
Upvote 0
Thanks for the calculation now I have another question.

I need another calculation for H5 I would like it to calculate the following

I would like it to count all cells containing the text Pass in J11:O26 plus J29:O36 plus J39:O59 then divide all cells with and without text on J11:O26 plus J29:O36 plus J39:O59 which should give me the average

Thanks,

lostboyca
 
Upvote 0
Hi lostboyca:

How about the following array formula ...

=(COUNTIF(J11:O26,"pass")+COUNTIF(J29:O36,"pass")+COUNTIF(J39:O59,"pass"))/(COUNTA(J11:O59&"")-COLUMNS(J:O)*(ROWS(1:4)))
 
Upvote 0
Here is a formula without using arrays

=COUNTA(J11:O26,J29:O36,J39:O59)/(COUNTA(J11:O26,J29:O36,J39:O59)+COUNTBLANK(J11:O26,J29:O36,J39:O59))
 
Upvote 0
Try...

=AVERAGE(IF(1-ISNUMBER(MATCH(ROW(J11:O59)-ROW(J11)+1,{17,18,27,28},0)),(J11:O59="Pass")+0))

...confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!
 
Upvote 0
Yogi Anand/Domenic –

Your script works now the question I have is that can you break down the script in English? I want to add more rows and cells to the calculation.

Chitosunday –
Your script did not work it error out and highlighted COUNTBLANK(J11:O26,J29:O36,J39:O59))


Thanks,

Lostboyca
 
Upvote 0
lostboyca said:
Your script works now the question I have is that can you break down the script in English? I want to add more rows and cells to the calculation.

With regards to my formula...

1) replace the references to J11:O59 with references to your new range, and

2) change the array constant {17,18,27,28} to specify which row, relative to the first row in your table, to exclude from the calculation. In this case, rows 17, 18, 27, and 28 are excluded from the calculation.
 
Upvote 0

Forum statistics

Threads
1,216,537
Messages
6,131,237
Members
449,637
Latest member
icecreampie

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