Auto counting

E

ernie

I got dates under column A and days passed by since date in column A in
Column B. How do I ask it to auto calculate the days passed with reference to
the date in real time.

Example:

A B
5 march 2010 11days
10 march 2010 6days

Given today's date is 17 march 2010
 
J

Jacob Skaria

Try

=SUMPRODUCT(INT((TODAY()-A1+WEEKDAY(A1-{2,3,4,5,6}))/7))

OR (From Analysis Tool Pak Add-In)
=NETWORKDAYS(A1,TODAY())
 
E

ernie

okay! thanks. I got exactly what I want. But I'm really interested to know
how it works.. Can you explains to me ? Please. Thanks you.
 
J

Jacob Skaria

The array gives the day numbers for the days Monday through Friday. For
example if you want to get a count of weekend days change that to {1,7}

You could re-write the formula as below...which will only consider the
weekdays which are specified in the array
=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&TODAY())))={2,3,4,5,6}))
 

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