Adding a column based on greater than a date

T

Toni G.

I am trying to add a column (Col. A) based on a date (Col. B). I want
to add Col. A if Col. B is within the next 30 days of today's date
(which I've put in Col. C). The formula I've tried is: SUMIF(A,"B>C
AND B<=C") but it doesn't work. Any ideas about what I'm doing wrong?
 
B

Bob Phillips

=SUMPRODUCT(--(B1:B1000>=TODAY()),(B1:B1000<=TODAY()+30),A1:A1000)

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
U

UBER_GEEK

for a range between 1-500

=SUMPRODUCT((B1:B500<=(TODAY())+30)*(B1:B500>=TODAY()),A1:A500)

Using entire columns error's out, and is uneeded unless you have a very
large amount of data.
 
T

Toni G.

As it turns out, the function is a bit more complicated by the fact
that I need to add three columns. This is for estimating cashflow and
here's what I've tried to do with what's been suggested but it's not
quite working:

=SUMPRODUCT((J4<=(TODAY())+30)*(J4>=TODAY()),S4)+((N4<=(TODAY())+30)*(N4>=TODAY()),T4)+((Q4<=(TODAY())+30)*(Q4>=TODAY()),U4)

where:
J4 - Date of deposit
S4 - Amount of deposit
N4 - Date of interim payment
T4 - Amount of interim payment
Q4 - Date of final payment
U4 - Amount of final payment

Any other suggestions?
 
B

Bob Phillips

I think you need to explain what the rules are, your formula is just a bit
of rubbish <bg>v

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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