Formula question

I

Imajica12345

I have a spreadsheet that tracks how far I hike in a given day. However, I
may do several shorter hikes in a day, and each one is tracked seperately.
Column A contains the date, column D contains the distance walked. If I do 3
hikes in a day, i have 3 rows, each with the same date, but the distance
walked is different.

So far so good. In cell F1 I put the same date, and i add all 3 hikes
together to give me a daily total.

Now day 2 comes along and i do 4 hikes, so now back to column A i have 4
more rows. Now in F2 i put in the 2nd date and tally up the total walked
that day. and on and on.

What I would like to find out is if there is a way to automatically do this
without manually doing it. Ie, I can manually enter the date in F1 and i
would want the total which appears in G1 to look at column A and see how many
rows that match the date, and then add the corresponding values in column D,
displaying the answer in G1.

What would be even better, is that I would not have to put the date in F1,
it would look at column A, and for every different date that shows up to put
each seperate date in F1, F2, etc, and then do the calculations.

I am not sure if this is something that can be done with formulas or would I
have to write a VB script.

Thx!
 
J

Jacob Skaria

--With date in F1; in G1 enter the formula
=SUMIF(A:A,F1,D:D)
This will give you the total for the date mentioned in F1

--I would suggest to enter the date in F1 column F1 -Jan1 F2 -Jan2 and drag
down as required. (Each row represents a date)

--Then drag down the formula in G1; so that as soon as you enter the data in
ColA/D the total will be reflected in ColumnG for the corresponding Date in F1

If this post helps click Yes
 
I

Imajica12345

that works great... thx!

Now, just another quetsion on the same topic..... if I enter the dates in
column A ... so i can have multiple rows with the same date, can i have each
unique date show up column F so I do not have to manually enter that in for
the formula in Column G to work?
 

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