Multiply many non-contiguous cells

K

KENNY

Hello,

I have two worksheet with the same layout:

A B C D E F
10 22 14 15 11 77

I would like to: (Sheet1!A1*Sheet2!A1) + Sum(Sheet1!
C1*Sheet2!C1)+ Sum(Sheet1!E1*Sheet2!E1 )

I'm skipping columns so an array is out, yes? Thanks!
 
F

Frank Kabel

Hi
try:
=SUMPRODUCT(Sheet1!A1:X1,Sheet2!A1:x1,--(MOD(COLUMN(Sheet1!A1:X1),2)=1)
)
 
K

KENNY

Great! What if I simply want to add the contents of every
other column (below)?
Thanks
 
D

Domenic

=SUMPRODUCT((Sheet1!A1:F1+Sheet2!A1:F1),--(MOD(COLUMN(Sheet2!A1:F1),2)=1)
)

Adjust the range accordingly.

Hope this helps!
 
K

KENNY

Thanks! Can you put the formula in laymen's term? I've
never seen the use of dashes before (--), and I don't see
it anywhere in Excel's HELP area
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top