#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Formula question

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!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Formula question

--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
---------------
Jacob Skaria


"Imajica12345" wrote:

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!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Formula question

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?

"Jacob Skaria" wrote:

--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
---------------
Jacob Skaria


"Imajica12345" wrote:

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!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula Question Nikki Excel Worksheet Functions 3 April 3rd 09 04:06 AM
Formula Question Stephanie Excel Discussion (Misc queries) 3 June 27th 08 07:26 PM
Formula Question Wanda Excel Worksheet Functions 6 November 7th 07 04:56 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
Formula question... HROBERTSON Excel Discussion (Misc queries) 2 July 21st 05 08:45 PM


All times are GMT +1. The time now is 04:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"