# Thread: A Better Formula (XP (2002))

1. ## Re: A Better Formula (XP (2002))

Try

=SUMPRODUCT(B3:B0,C3:C40)

(I assume that you want to multiply pay rates and number of hours, not employee names and pay rates <img src=/S/grin.gif border=0 alt=grin width=15 height=15>)

2. ## Re: A Better Formula (XP (2002))

How about the formula SUM(A3:A40*B3:B40) entered as an array (CTRL+SHIFT+ENTER)?

Alan

3. ## A Better Formula (XP (2002))

<P ID="edit" class=small>(Edited by Tricky on 28-Dec-03 19:58. Corrected my example...Thanks Hans.)</P>Help! I'm looking for a better way to get a desired result. What I have is a list of employee names in the A column (A3:A40). In the B column is their respective pay rates. In the C column is the number of hours worked in a given work week, D column is another week, E another, etc,

At the bottom of each weekly column (C42) for example), I'm attempting to display the total wages paid for that week. Looking for something simple, overtime is not a factor. I'm suffering from a mental block but I know there's got to be a better formula than:

=(B3*C3)+(B4*C4)+(B5*C5)+(B6*C6)............

4. ## Re: A Better Formula (XP (2002))

Just to make sure: Alan's formula is an array formula (to be confirmed with Ctrl+Shift+Enter), but mine isn't, it is a "normal" formula. Both should work fine.

5. ## Re: A Better Formula (XP (2002))

But Hans' formula will work faster.

6. ## Re: A Better Formula (XP (2002))

Thanks Hans and Alan...I appreciate the quick responses. I knew there was a way to do this using an array formula but I'm still unfamiliar with their usefulness. I'm going to use the solution that allows for simpler copying from one column to the next.

<img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Follow-Up Note: I found that the auto-fill feature works fine for both methods provided the cell references for the first array is set to absolute, as in <font color=blue>\$B\$3:\$B\$40 </font color=blue>

Thanks again

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•