ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   is this possible? (https://www.excelbanter.com/new-users-excel/99405-possible.html)

John

is this possible?
 
I already do this using a macro but thought it might be possible with
just a cell function.

Column B has either 1,2,3, or 4 in it. These are service codes. Column C
has hours in it. I want total hours per service in another place on the
sheet. So... it's find a all the 1's say, multiply each by the hours in
the same row in C and add that prduct to another cell. Do that until
there is a blank in coloumn B. Do it, also, for 2,3, and 4.

The macro is a simple while/wend.

thanks

John

paul

is this possible?
 
sumproduct
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

--
paul

remove nospam for email addy!



"John" wrote:

I already do this using a macro but thought it might be possible with
just a cell function.

Column B has either 1,2,3, or 4 in it. These are service codes. Column C
has hours in it. I want total hours per service in another place on the
sheet. So... it's find a all the 1's say, multiply each by the hours in
the same row in C and add that prduct to another cell. Do that until
there is a blank in coloumn B. Do it, also, for 2,3, and 4.

The macro is a simple while/wend.

thanks

John


daddylonglegs

is this possible?
 

=SUMIF should be sufficient.

For Service code 3 for instance

=SUMIF(B:B,3,C:C)


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=561658


John

is this possible?
 
paul wrote:
sumproduct
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

This is great. How do I indicate the last used cell in the coloumn?
Thanks
John

John

is this possible?
 
daddylonglegs wrote:

=SUMIF should be sufficient.

For Service code 3 for instance

=SUMIF(B:B,3,C:C)


This worked for me. Thanks
John


All times are GMT +1. The time now is 06:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com