matrix math in excel?

D

dschneiderch

I have two columns of data. The first column is each day from 4/1 to
11/30. The second colum is a value for each month. I'd like to
multiply all days in april by the first value in the second column and
all days in may by the second value in the second column ...etc. Is
there any way to do this without manually selecting the days?

Thanks
Dominik
 
J

joeu2004

I have two columns of data.  The first column is each day from
4/1 to 11/30.  The second colum is a value for each month.
 I'd like to multiply all days in april by the first value in
the second column and all days in may by the second value in
the second column ...etc.

I suspect your explanation is not quite right. A concrete example
would help resolve ambiguities and possible mistakes in the problem
description.

Suppose you have dates from 4/1 through 11/30 in column A starting in
A2, some amounts for each date in column B starting in B2, and some
multiplier for each month in C2:C9

Then put the following formula into D2 and copy down for each date in
column A:

=B2*INDEX($C$2:$C$9,MONTH(A2)-3)

Of course, if you truly meant to multiply the date in column A(!), you
would write:

=A2*INDEX($C$2:$C$9,MONTH(A2)-3)  
 
D

dschneiderch

I suspect your explanation is not quite right.  A concrete example
would help resolve ambiguities and possible mistakes in the problem
description.

Suppose you have dates from 4/1 through 11/30 in column A starting in
A2, some amounts for each date in column B starting in B2, and some
multiplier for each month in C2:C9

Then put the following formula into D2 and copy down for each date in
column A:

=B2*INDEX($C$2:$C$9,MONTH(A2)-3)

Of course, if you truly meant to multiply the date in column A(!), you
would write:

=A2*INDEX($C$2:$C$9,MONTH(A2)-3)   

You are correct. I was looking to multiply by the value associated
with each day. Thanks once again.
Dominik
 

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