LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Revenger
 
Posts: n/a
Default How do I sum scattered entries on an Excel worksheet?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Excel worksheet linking Shiren Excel Worksheet Functions 0 July 6th 05 05:33 PM
Rename Excel Worksheet Dragon Excel Discussion (Misc queries) 6 June 20th 05 03:19 PM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM


All times are GMT +1. The time now is 12:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"