sumif criteria

G

Guest

Hi,
I have a row with data and a row with values. I am trying to add the values
that are happening up till year 2008.
If I do SUMIF(A1:H1,"<2008",A2:H2) it works, but if I try to keep the year
flexible and have a variable in place of the criteria, then t is just giving
me zero. Is there any reason why my criteria can only be hard coded number?

A B C D E F
G H
1 2005 2006 2007 2008 2009 2010 2011 2012
2 8123 8160 8049 8190 8049 8034 7715 7687

Thanks. Neda
 
M

mzehr

Hi,
Have you tried something like
=SUMIF(A1:H1,"<"&A9,A2:H2)
and put your variable in A9?
 

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