I need a formula that is beyond me and my Excel skills, I need to insert the number of time开发者_开发知识库s a match is found in column A into column C and then insert the total number of days for that person in column D. Can anyone help?
In cell C2:
=COUNTIF(A$2:A$6,A2)
In cell D2:
=SUMIF(A$2:A$6,A2,B$2:B$6)
See also:
COUNTIF
SUMIF
Have you considered using a pivot table? It's a little bit overkill but greatly simplifies what you want to do. Assuming your using Excel 2007:
- Select the range of data including column labels.
- Go to Insert->[Tables]->PivotTable.
- In the dialog box that appears, select Existing Worksheet, choose a cell a click OK.
At this point, the PivotTable pane appears with your field names in one box and four other labeled boxes below.
- Drag Name to the Row Labels box.
- Drag Name to the Values box.
- Drag Days to the Values box.
You're done!
精彩评论