From: Rik_A on
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.
From: Steve Dunn on
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.




"Rik_A" <Rik_A(a)discussions.microsoft.com> wrote in message
news:6C5EC104-EAD4-4EF4-9EEF-ED11EA6830BD(a)microsoft.com...
> 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.

From: Jacob Skaria on
Do you mean...

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

--
Jacob (MVP - Excel)


"Rik_A" wrote:

> 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.