![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Posts: 436
|
I have a column that I count sick time occurrences with. When someone calls in sick I subtract the time, but in the top row I count the incident. I use the function COUNTA, what I want to do is be able to credit the top row to take one inceident away when deemed necessary. But I want to preserve the minus sick time with out deleting the data to increase the number in row one by one. I may need to use something other than COUNTA but unsure what.
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
If I understand you correctly, you can use the COUNT function to count the number of sick time incidents (it will not count the header item), and you can use the SUM function to sum the sick time hours
so if you had sick_time -2 -3 -4 -1 in cells A1:A5 =COUNT(A1:A5) ... will give you 4 incidents =sum(A1:A5) ... will give you -10 as sick time hours Hope This Helps Regards! |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Apr 2002
Posts: 436
|
But then I would like to be able to put something in the column to subtract one fr the header.
|
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
Using the COUNT function allowed me to only count the numeric entries, it did not count for the header row. Please note that there are 5 rows in the small sample I used, but the number of incidents counted is only 4. If I were to have used COUNTA function, then I would have counted all 5 of the entries -- in that case the formual would have been =COUNTA(A1:A5)-1 Now that we have looked at the use of both COUNT and COUNTA, you can make any additional adjustments that you need to make to the formula. Regards! |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|