Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to calculate Total for different Group from user entries

I got a Question.... Hope someone can help me to solve...

I had do 1 userform that get entries from users. I will get their nam
and project that they handle and the hours they spent for the project.

For example, I get 5 entries, which a
Name Project Hours
Dan A 3
Upls B 5
In A 5
Kon B 2
Kasn C 3

Well, after I get this entries, I will sort them base on the projec
name. My question is how we gonna to calculate the total hours fo
project A, project B and Project C? Since I dunno how many entries wil
be made by users(either 2 projects, either 4 projects...and it is no
fix) I cannot have total1 = project A, total2= project B..... Is ther
any method to calculate the total for each projects

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default How to calculate Total for different Group from user entries

Assuming project Names starting from B2 and Hours from C2 on sheet Sheet1:
lastr = Worksheets("Sheet1").Range("B65536").End(xlUp).Row
ProjectA = Evaluate("=SUMIF(B2:B" & lastr & ",""A"",C2:C" & lastr & ")")
ProjectB = Evaluate("=SUMIF(B2:B" & lastr & ",""B"",C2:C" & lastr & ")")
MsgBox "Project A: " & ProjectA & vbCrLf & "Project B: " & ProjectB

HTH
Regards
Pascal

"unplugs " a écrit dans le message
de ...
I got a Question.... Hope someone can help me to solve...

I had do 1 userform that get entries from users. I will get their name
and project that they handle and the hours they spent for the project.

For example, I get 5 entries, which a
Name Project Hours
Dan A 3
Upls B 5
In A 5
Kon B 2
Kasn C 3

Well, after I get this entries, I will sort them base on the project
name. My question is how we gonna to calculate the total hours for
project A, project B and Project C? Since I dunno how many entries will
be made by users(either 2 projects, either 4 projects...and it is not
fix) I cannot have total1 = project A, total2= project B..... Is there
any method to calculate the total for each projects?


---
Message posted from http://www.ExcelForum.com/



Reply
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
conditional formatting to group rows with repeating entries Smallweed Excel Discussion (Misc queries) 3 July 7th 08 02:18 PM
How do I get the average of entries in a group of columns? Motown Mick Excel Discussion (Misc queries) 6 July 28th 07 09:28 PM
calculate count on 2006 total, 2005 total, etc... Amanda Deshotel Excel Worksheet Functions 6 September 28th 06 11:59 PM
How do I group multiple data entries in sub-groups wendyrose1034 Excel Worksheet Functions 1 July 27th 05 04:46 PM
Hyperlink for a group of addresses without individual entries? Peter R Excel Discussion (Misc queries) 1 February 10th 05 01:10 AM


All times are GMT +1. The time now is 05:29 PM.

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

About Us

"It's about Microsoft Excel"