Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

excel help using countif?

I have an excel spreadsheet with a student list one sheet one and attendance counts on sheet two. I use this function in sheet one to get an attendance report

=COUNTIF(Sheet2.A1:Sheet2.A30;2500)

In this function, the number 2500 is the student number.

I have to apply this for each student in sheet one, and I apply the cursor on the same row of each student to get the attendance result.

I'd like to have the function repeat down sheet one, with the student number change for each function run, depending on the line its on in sheet 1. Is there a way to do this?

Update:

Changing the student number to a cell reference is a good idea. Is there a way I can have the function run several times for each line?

2 Answers

Relevance
  • Anonymous
    1 decade ago
    Favorite Answer

    Replace 2500 with the cell reference then copy and paste the formula down the column.

  • IXL@XL
    Lv 7
    1 decade ago

    Add a column say X to your sheet with all your student numbers in individual cells ie 1 2 ,,,, 2500 etc. Now make your formula refer to a cell rather than a single value. Your formula should now read like this

    =COUNTIF(Sheet2!A1:Sheet2!A30,

    X1) (all one line).

    Copy down as far as is needed

    Ps why not give Sheet2!A1:Sheet2!A30 a range name as well. Makes it easier to refer to in formulas.

    HTH

Still have questions? Get your answers by asking now.