![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 1
|
Hi,
I am running a spreadsheet to check amount of fuel put into the company vehicles. I have a number of columns, but the ones that I need are Reg. No and Total Input. Now, I would like to set something up that will automatically calculate the total fuel input of a particular reg. To illustrate: Reg: Input: R717 25 S283 34 R716 18 R717 25 S283 34 R716 18 Total (I would prefer this to be in another worksheet) Reg: Total Input: R717 50 S283 68 R716 36 However, there are about 17 vans, and I already have nearly 200 entries for the month of April, as they fill up perhaps twice a day. It is probably very easy - I hope so anyway - can anyone help me? Cheers. Markus. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,319
|
I'd suggest to have a look at PivotTables.
SUMIF would also do the job. Lets say that A1:B7 in Sheet1 houses the sample you provided: {"Reg. No","amount"; "R717",25; "S283",34; "R716",18; "R717",25; "S283",34; "R716",18} Create a unique list of Reg. No's in a second sheet, in A from A2 on like this: {"Reg. No"; "R717"; "S283"; "R716"} In B2 enter and copy down: =SUMIF(Sheet1!$A$2:$A$7,A2,Sheet1!$B$2:$B$7) Aladin |
|
|
|
|
|
#3 |
|
New Member
Join Date: Feb 2006
Location: NH
Posts: 1
|
I have a similar situation and your formula definately helped me.
I used your formula to grab a certain price in A2 through A6400 then to find the amount of gallons that were sold at that price B2 through B6400 Instead of typing in a new formula for each new/old price I would like to be able to... in my total cell type in a price and have it find the all the gallons relating to that specific price. I have price changes that range in the hundreds. I have searched high and low from MS website to online forums and seraches and I cannot find away to do this with excel. Thanks and I hope this is the right spot for this. |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: May 2002
Posts: 13,278
|
usually best to start a new thread, dbut as we're here...
have you tried out a filter? (data | filter) with a 'normal' filter, just set up the filter then go to the custom... option & pick your value with an advanced filter, you can put the results to a new area if you want to 'extract' the results, not just view them in situ. review the excel help file topic for 'Filter a list by using advanced criteria' |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Posts: 7,743
|
Jeff,
Try A Pivot Table as Aladin suggested. It's not that difficult and the ways your data set is, it shouldn't be a problem, I'll try and find a link for PT tutorials.. Here's a link, http://www.peltiertech.com/Excel/Pivots/pivottables.htm |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|