Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Fri, 20 Jan 2006 04:58:03 -0800, bassmanfranc wrote:
I would like to be able to locate all of one type of entry on a spreadsheet and sum the accompanying entered values. Example: Users enter mutliple entries for SMITH job in the NAME column(A) and a value of 1.5 in the HOURS column(B) associated with it. They do this various times on this worksheet, but not in sequence. How can I LOCATE all of the scattered SMITH entries in the NAME column and SUM the associated VALUES in the HOURS column, giving me all of the hours entered for the SMITH job? EXCEL 2002 SP3 Sub FindSMITH row = Application.WorksheetFunction.Match("SMITH","A1:A2 00", 0) total = total + Cells(row,2).Value Cells(1,3).Value = total End sub Function Match is looking for "SMITH" in the range "A1:A200" (you can change the range to your needs) and returns the row number ... Next you add the value of the cell in that row and column B (column index 2) to the "total" variable Third line adds the value of total to cell C1 ( Cells(1,3) ). You can change this also and put the "total" value where you want ... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? | Excel Discussion (Misc queries) | |||
Excel worksheet linking | Excel Worksheet Functions | |||
Rename Excel Worksheet | Excel Discussion (Misc queries) | |||
Excel Range Value issue (Excel 97 Vs Excel 2003) | Excel Discussion (Misc queries) | |||
Weekly Transaction Processing | Excel Worksheet Functions |