result given from content of selected cells.

R

Rik_A

is there any way to give a result in one cell from the content of other
selected cells.

scenario:
i am trying to create a spreadsheet to work out my current grades for
college. what i am wanting to do is create a function that takes the value
from a selection of cells (ex. B1:B7) and give a result if the content match
a given criteria.
i am looking for something along along the lines of;

cells B1:B7 = x then show result value 1. cells B1:B11 = x then show result
value 2. cells B1:B13 = x then show result 3. (best i can say it as)

my initial through was the IF statement but that failed to give the results.

much appreciated if guidance can be given.
 
M

Mike H

Hi,

I'm not sure I fully understand gut how about this

=COUNTIF(B1:B7,"XXX")

Where XXX is the string your looking for. Or if your looking for numbers try

=COUNTIF(B1:B7,1)
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
S

Steve Dunn

Taking your requirements literally, something like:

=(COUNTIF(B1:B7,"x")=ROWS(B1:B7))+(COUNTIF(B8:B11,"x")=ROWS(B8:B11))+(COUNTIF(B12:B13,"x")=ROWS(B12:B13))

should do the trick.
 
R

Rik_A

the COUNTIF function only adds up the cells contents and give a number result
on the number of the matching criteria.
(B1:B7 with the contents of x, the function =COUNTIF(B1:B7,"x") give the
result of "7")
what i am looking for is,
should cell B1, B2, B3, B4, B5, B6 and B7 contents equal "x" the show result
"Pass" (the cells B1:B7 being the pass criteria for my work) but if 1 of the
7 cells show no content then that result is nullified.
*apologies for not creates a clear image"

i originally thought of "=IF(B1:B7=x,pass,null)" but realise this wouldn't
work. i hope this helps in the understanding.
 
J

Jacob Skaria

Do you mean...

=IF(COUNTIF(B1:B7,"X"),1,IF(COUNTIF(B1:B11,"X"),2,
IF(COUNTIF(B1:B13,"X"),3,"")))
 
M

Mike H

Hi,

Is this it

=IF(COUNTIF(B1:B7,"xxx")=7,"Pass","Maybe fail")
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top