perhaps a "lookup" is better? help

N

nca77

hi all, first time poster here.

here's my issue. I am trying to create a formula that will grab inf
from a cell only if the header of the column is = 2004, then i need t
sumproduct the data using the days of the month assigned to eac
column.

so basically row 3 has month end dates from April 30, 2004 going out 6
months out (mar, 31, 2009)

then row 2 says "=day(a1)"

then row 1 says "=year(a1)"

rows 5 - 14 have the 60 months of data

so then i have cell B16 as my input cell where i can enter "2004" an
my formula will check to see if data in row 3 = cell b16, then gra
data in b4

=IF($B$1=B16,$B$8)+IF($C$1=B16,$C$8)+IF($D$1=B16,$D$8)+IF($E$1=B16,$E$8)+IF($F$1=B16,$F$8)+IF($G$1=B16,$G$8)+IF($H$1=B16,$H$8)+IF($I$1=B16,$I$8)+IF($J$1=B16,$J$8)+IF($K$1=B16,$K$8)+IF($L$1=B16,$L$8)+IF($M$1=B16,$M$8)+IF($N$1=B16,$N$8)+IF($O$1=B16,$O$8)+IF($P$1=B16,$P$8)+IF($Q$1=B16,$Q$8)+IF($R$1=B16,$R$8)+IF($S$1=B16,$S$8)+IF($T$1=B16,$T$8)+IF($U$1=B16,$U$8)+IF($V$1=B16,$V$8)

the formula is longer and its probably not the best way to do this s
any help is appreciated.. now that i have the formula summing the data
how can i have it weighted using sumproduct

THANKS SO MUCH,

Nic
 
D

Don Guillett

this might be a bit better. change the iv to suit your last column
=SUMIF(B1:iv1,B16,B8:iv8)
 
N

nca77

thank you for introducing me to "sumif"

that formula works great now!

i just have one additional question.

i now have the sum of all the "2004" accounts, but what i need now is
weighted average of the monthly balances.. so i was usin
sumproduct(range of months in 2004,# of days of those months)/remainin
days left in the year

thanks alot
 

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

Similar Threads


Top