2 Replies Latest reply on May 21, 2009 1:55 PM by benchmarkinst.

# Is there a script for counting values

How would one go about writing a script which counts the specific values in separate cells.  i.e. a cell will contain a script to count how many of the 20 selected cells show a value of 100%, 75%, or the word "reject".

Thank you,

• ###### 1. Re: Is there a script for counting values

==============================

var c70 = 0;

var c100 = 0;

var cReject = 0;

While iterating through your 20 cells

{

if (cellVALUE == "75%")

c70++;

if (cellVALUE == "100%")

c100++;

if (cellVALUE == "reject")

cReject++;

}

==============================

If the above doesn't help...

I think your question is more... how does one iterate through the 20 cells and get their values!?

• ###### 2. Re: Is there a script for counting values

Thank you for your help however, I think I need to be a little more specific.

The object cell will contain a script which counts how many times the value 1 or .75 occurs within 12 separate cells.

Object cell name = Bow1

Target cell names = 1A1%, 1A2%, 1A3%, 1A4%, 1B1%, 1B2%, 1B3%, 1B4%, 1C1%, 1C2%, 1C3%, 1C4%