Excel Formula: To Calculate Letters in Column.

Asked By 50 points N/A Posted on -
qa-featured

I've made an Excel Sheet for the Staff Attendance of my company.

The Present of staff is Marked in Excel Sheet as "P", while Leave is Marked as "L".

Just like below:

I want to know an Excel formula which automatically calculates the number of "P" = Present for a Staff Member in a month as well as the "L" = Leaves of a Staff member in a month.

Please reply soon.

Bruce

SHARE
Best Answer by Wally_West
Best Answer
Best Answer
Answered By 0 points N/A #115264

Excel Formula: To Calculate Letters in Column.

qa-featured

It's a pretty simple formula.  What you will need is the COUNTIF function.

Below is a link from office.microsoft.com that explains the COUNTIF function.  It also shows some examples.

Microsoft Office

Now let's discuss your spreadsheet.  Assuming that your Ps and Ls are in the cells from A1 to A200, we can write the 2 formulas below:

For counting those who are Present (counting the number of cells with "P"):

  • COUNTIF(A1:A200,"P");
  • The result would be the number of cells containing "P" in the range A1 to A200.

For counting those that are on Leave (counting the number of cells with "L"):

  • COUNTIF(A1:A200,"L");
  • The result would be the number of cells containing "L" in the range A1 to A200.

Good luck on your spreadsheet!  Hope this helps!

Answered By 0 points N/A #115265

Excel Formula: To Calculate Letters in Column.

qa-featured
  1. Select the area that you want to calculate the number of X : " I refer to X as P or L".
  2. Suppose the selected area is A1:E20, the formula will be:    =countif(A1:E20,X)

Related Questions