Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formula Question | Excel Worksheet Functions | |||
Formula Question | Excel Discussion (Misc queries) | |||
Formula Question | Excel Worksheet Functions | |||
Newbie Question - Subtraction Formula Question | Excel Discussion (Misc queries) | |||
Formula question... | Excel Discussion (Misc queries) |