Sum a table of columns & rows

I have a spreadsheet of 154 Rows (all unique project numbers in numerical 
order) and 9 columns of account numbers (some are similiar and some are user 
entered, therefore there could be 'blanks' with no data in them).  

I am trying to create a table that will only give me the project number if 
there are dollars in one or more of the columns.  This would be used for data 
entry (and that is why I would like to have the columns summed up - to remove 
duplicates).

Any ideas?  I have given a brief example below:
                                                                 F, G, & H 
are User Defined Cols
     A                B          C         D         E      F           G    
       H   
1   Project #    1100   1111    1100    1100  "Blank"   4233     1111
2   00001       $50.00  $25.00  $3.00   $1.00              $25.00  $10.00
3   10000                    $5.00                                     $ 
5.00  $10.00
4   25000      $50.00   $10.00                                    $1.00   

What I would like to see is a table of the summarized data below:

Project   Account    Amount
00001     1100       $54.00
00001     1111       $35.00
00001     4233       $25.00
10000     1111       $15.00
10000     4233       $  5.00
25000     1100       $50.00
25000     1111       $10.00
25000     4233       $ 1.00            

Is this something that I can create using a pivot table and if so, how?

Thanks for your help!


0
11/20/2006 4:21:02 PM
excel 39879 articles. 2 followers. Follow

4 Replies
462 Views

Similar Articles

[PageSpeed] 29

try using sumproduct idea
=sumproduct((a2:a200="0001")*(b2:b200=1100)*c2:c200)

-- 
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
"Frank Costa" <FrankCosta@discussions.microsoft.com> wrote in message 
news:03BAE23F-3998-4188-AB77-609DB80607AE@microsoft.com...
>I have a spreadsheet of 154 Rows (all unique project numbers in numerical
> order) and 9 columns of account numbers (some are similiar and some are 
> user
> entered, therefore there could be 'blanks' with no data in them).
>
> I am trying to create a table that will only give me the project number if
> there are dollars in one or more of the columns.  This would be used for 
> data
> entry (and that is why I would like to have the columns summed up - to 
> remove
> duplicates).
>
> Any ideas?  I have given a brief example below:
>                                                                 F, G, & H
> are User Defined Cols
>     A                B          C         D         E      F           G
>       H
> 1   Project #    1100   1111    1100    1100  "Blank"   4233     1111
> 2   00001       $50.00  $25.00  $3.00   $1.00              $25.00  $10.00
> 3   10000                    $5.00                                     $
> 5.00  $10.00
> 4   25000      $50.00   $10.00                                    $1.00
>
> What I would like to see is a table of the summarized data below:
>
> Project   Account    Amount
> 00001     1100       $54.00
> 00001     1111       $35.00
> 00001     4233       $25.00
> 10000     1111       $15.00
> 10000     4233       $  5.00
> 25000     1100       $50.00
> 25000     1111       $10.00
> 25000     4233       $ 1.00
>
> Is this something that I can create using a pivot table and if so, how?
>
> Thanks for your help!
>
> 


0
dguillett1 (2487)
11/20/2006 5:19:52 PM
Don, thanks for your response, but it confuses me.

In my example, I do have some account numbers that will be the same, so I 
can identify them.  My issue comes in where there are five user defined 
account numbers (which may be the same as the hard coded numbers).  Those 
user defined account numbers are entered into a column and my table picks 
them up from a formula such as "=c4" (where c4 is the cell the user enters 
the account number).  

Does that help clarify my original question?

Thanks for your help.  I do appreciate it.

"Don Guillett" wrote:

> try using sumproduct idea
> =sumproduct((a2:a200="0001")*(b2:b200=1100)*c2:c200)
> 
> -- 
> Don Guillett
> SalesAid Software
> dguillett1@austin.rr.com
> "Frank Costa" <FrankCosta@discussions.microsoft.com> wrote in message 
> news:03BAE23F-3998-4188-AB77-609DB80607AE@microsoft.com...
> >I have a spreadsheet of 154 Rows (all unique project numbers in numerical
> > order) and 9 columns of account numbers (some are similiar and some are 
> > user
> > entered, therefore there could be 'blanks' with no data in them).
> >
> > I am trying to create a table that will only give me the project number if
> > there are dollars in one or more of the columns.  This would be used for 
> > data
> > entry (and that is why I would like to have the columns summed up - to 
> > remove
> > duplicates).
> >
> > Any ideas?  I have given a brief example below:
> >                                                                 F, G, & H
> > are User Defined Cols
> >     A                B          C         D         E      F           G
> >       H
> > 1   Project #    1100   1111    1100    1100  "Blank"   4233     1111
> > 2   00001       $50.00  $25.00  $3.00   $1.00              $25.00  $10.00
> > 3   10000                    $5.00                                     $
> > 5.00  $10.00
> > 4   25000      $50.00   $10.00                                    $1.00
> >
> > What I would like to see is a table of the summarized data below:
> >
> > Project   Account    Amount
> > 00001     1100       $54.00
> > 00001     1111       $35.00
> > 00001     4233       $25.00
> > 10000     1111       $15.00
> > 10000     4233       $  5.00
> > 25000     1100       $50.00
> > 25000     1111       $10.00
> > 25000     4233       $ 1.00
> >
> > Is this something that I can create using a pivot table and if so, how?
> >
> > Thanks for your help!
> >
> > 
> 
> 
> 
0
11/20/2006 8:07:01 PM
Frank,

Try this macro.  If anyone else could tell me a way to do away with the
LETTERS, then I would be appreciative.  I'm just getting back to Excel
after a few years without it.

Public Sub TotalsOfPivotTable()
    Dim wsin As Worksheet, wsout As Worksheet
    Dim iProjLoop As Integer, iAccoLoop As Integer, x As Integer
    Dim dValue As Double
    Dim proj As String, acco As String
    Dim bFound As Boolean

    Const LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

    Set wsin = Sheets("yourSheetNameHere")
    Set wsout = Sheets.Add
    With wsout
        .Name = "Output"
        .Range("A1").Value = "Project"
        .Range("B1").Value = "Account"
        .Range("C1").Value = "Amount"
    End With

    Application.ScreenUpdating = False
    wsin.Select
    For iProjLoop = 2 To ActiveSheet.UsedRange.Rows.Count
        proj = Range("A" & iProjLoop).Value
        For iAccoLoop = 2 To ActiveSheet.UsedRange.Columns.Count
            acco = Range(Mid(LETTERS, iAccoLoop, 1) & "1").Value
            If Not acco = "" Then
                dValue = Range(Mid(LETTERS, iAccoLoop, 1) &
iProjLoop).Value
                If Not dValue = 0 Then
                    wsout.Select
                    bFound = False
                    For x = 2 To ActiveSheet.UsedRange.Rows.Count
                        If Range("A" & x).Value = proj And Range("B" &
x).Value = acco Then
                            Range("C" & x).Value = Range("C" & x).Value
+ dValue
                            bFound = True
                        End If
                    Next x
                    If Not bFound Then
                        x = ActiveSheet.UsedRange.Rows.Count + 1
                        Range("A" & x).Value = proj
                        Range("B" & x).Value = acco
                        Range("C" & x).Value = dValue
                    End If
                    wsin.Select
                End If
            End If
        Next iAccoLoop
    Next iProjLoop
    Application.ScreenUpdating = True
End Sub


Frank Costa wrote:
> Don, thanks for your response, but it confuses me.
>
> In my example, I do have some account numbers that will be the same, so I
> can identify them.  My issue comes in where there are five user defined
> account numbers (which may be the same as the hard coded numbers).  Those
> user defined account numbers are entered into a column and my table picks
> them up from a formula such as "=c4" (where c4 is the cell the user enters
> the account number).
>
> Does that help clarify my original question?
>
> Thanks for your help.  I do appreciate it.
>
> "Don Guillett" wrote:
>
> > try using sumproduct idea
> > =sumproduct((a2:a200="0001")*(b2:b200=1100)*c2:c200)
> >
> > --
> > Don Guillett
> > SalesAid Software
> > dguillett1@austin.rr.com
> > "Frank Costa" <FrankCosta@discussions.microsoft.com> wrote in message
> > news:03BAE23F-3998-4188-AB77-609DB80607AE@microsoft.com...
> > >I have a spreadsheet of 154 Rows (all unique project numbers in numerical
> > > order) and 9 columns of account numbers (some are similiar and some are
> > > user
> > > entered, therefore there could be 'blanks' with no data in them).
> > >
> > > I am trying to create a table that will only give me the project number if
> > > there are dollars in one or more of the columns.  This would be used for
> > > data
> > > entry (and that is why I would like to have the columns summed up - to
> > > remove
> > > duplicates).
> > >
> > > Any ideas?  I have given a brief example below:
> > >                                                                 F, G, & H
> > > are User Defined Cols
> > >     A                B          C         D         E      F           G
> > >       H
> > > 1   Project #    1100   1111    1100    1100  "Blank"   4233     1111
> > > 2   00001       $50.00  $25.00  $3.00   $1.00              $25.00  $10.00
> > > 3   10000                    $5.00                                     $
> > > 5.00  $10.00
> > > 4   25000      $50.00   $10.00                                    $1.00
> > >
> > > What I would like to see is a table of the summarized data below:
> > >
> > > Project   Account    Amount
> > > 00001     1100       $54.00
> > > 00001     1111       $35.00
> > > 00001     4233       $25.00
> > > 10000     1111       $15.00
> > > 10000     4233       $  5.00
> > > 25000     1100       $50.00
> > > 25000     1111       $10.00
> > > 25000     4233       $ 1.00
> > >
> > > Is this something that I can create using a pivot table and if so, how?
> > >
> > > Thanks for your help!
> > >
> > > 
> > 
> > 
> >

0
jlepack (32)
11/20/2006 9:09:00 PM
Then just change to c4
sumproduct((a2:a200="0001")*(b2:b200=c4)*c2:c200)

-- 
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
"Frank Costa" <FrankCosta@discussions.microsoft.com> wrote in message 
news:2900A734-B08A-426B-B310-12C84F458C67@microsoft.com...
> Don, thanks for your response, but it confuses me.
>
> In my example, I do have some account numbers that will be the same, so I
> can identify them.  My issue comes in where there are five user defined
> account numbers (which may be the same as the hard coded numbers).  Those
> user defined account numbers are entered into a column and my table picks
> them up from a formula such as "=c4" (where c4 is the cell the user enters
> the account number).
>
> Does that help clarify my original question?
>
> Thanks for your help.  I do appreciate it.
>
> "Don Guillett" wrote:
>
>> try using sumproduct idea
>> =>>
>> -- 
>> Don Guillett
>> SalesAid Software
>> dguillett1@austin.rr.com
>> "Frank Costa" <FrankCosta@discussions.microsoft.com> wrote in message
>> news:03BAE23F-3998-4188-AB77-609DB80607AE@microsoft.com...
>> >I have a spreadsheet of 154 Rows (all unique project numbers in 
>> >numerical
>> > order) and 9 columns of account numbers (some are similiar and some are
>> > user
>> > entered, therefore there could be 'blanks' with no data in them).
>> >
>> > I am trying to create a table that will only give me the project number 
>> > if
>> > there are dollars in one or more of the columns.  This would be used 
>> > for
>> > data
>> > entry (and that is why I would like to have the columns summed up - to
>> > remove
>> > duplicates).
>> >
>> > Any ideas?  I have given a brief example below:
>> >                                                                 F, G, & 
>> > H
>> > are User Defined Cols
>> >     A                B          C         D         E      F 
>> > G
>> >       H
>> > 1   Project #    1100   1111    1100    1100  "Blank"   4233     1111
>> > 2   00001       $50.00  $25.00  $3.00   $1.00              $25.00 
>> > $10.00
>> > 3   10000                    $5.00 
>> > $
>> > 5.00  $10.00
>> > 4   25000      $50.00   $10.00                                    $1.00
>> >
>> > What I would like to see is a table of the summarized data below:
>> >
>> > Project   Account    Amount
>> > 00001     1100       $54.00
>> > 00001     1111       $35.00
>> > 00001     4233       $25.00
>> > 10000     1111       $15.00
>> > 10000     4233       $  5.00
>> > 25000     1100       $50.00
>> > 25000     1111       $10.00
>> > 25000     4233       $ 1.00
>> >
>> > Is this something that I can create using a pivot table and if so, how?
>> >
>> > Thanks for your help!
>> >
>> >
>>
>>
>> 


0
dguillett1 (2487)
11/20/2006 10:34:53 PM
Reply:

Similar Artilces:

FRx DAX Table
Hi everyone!! The company that we are handling is using FRX 6.5 (no service packs were installed)and have a problem with its FRx Currency Translator.Everytime we generate report the report doesn't use the historical rates that was defined in the DAX Table. I greatly appreciate your help on this matter. Ivy Tarrobago Application Specialist Infosoft International Solutions Inc. ...

Determining if a value exists in a column
I have a spreadsheet with one column of data, and I want to check al the values in that column to see if they exist in another column o data. What types of formulas or operations exist in excel that will allow m to accomplish this? Michae -- Lord M ----------------------------------------------------------------------- Lord MJ's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2660 View this thread: http://www.excelforum.com/showthread.php?threadid=39879 Lord MJ Wrote: > I have a spreadsheet with one column of data, and I want to check all > the values ...

How to set the autofill options in a column of a input data table
I have a table that is designed and saved for data input. On this table some columns sequence when auto fill is used and others just copy. I can of course use the control key to vary the autofill result but this involves using the hand that is keeping place on the paper sheet record and anyway is not a neat use of the spreadsheet. I can find no way of setting this requirement. Try using the "Right Click" and drag options. -- HTH, RD ============================================== Please keep all correspondence within the Group, so all may benefit! =========================...

results table dilemma
hi there everyone, I'm hopeful that someone can help me with my excel problem. Here's my dilemma: I'm trying to do a results table where results will come from a worksheet that has different columns, one of which is a date column(let's call it worksheet A). Now the results table is in another worksheet in the same workbook, and before results are generated, I'd like the user to specify a date and then the results table will be populated with entries from worksheet a that matches the specified date and dates from the previous week. im not quite sure if it's possi...

How to perform sum sum sum...
How to perform sumation within that particular item but the item is not unique...means item 1 has its own quantity and same goes to item 2...but in the same table... -- Message posted via http://www.accessmonster.com On Tue, 17 Apr 2007 05:28:12 GMT, "EMILYTAN via AccessMonster.com" <u33296@uwe> wrote: >How to perform sumation within that particular item but the item is not >unique...means item 1 has its own quantity and same goes to item 2...but in >the same table... Group By the item. For a more detailed answer, please post a more detailed question (with a des...

Summing up user defined results
Hi all - I'm new to VBA programming in Excel and so any help i'd totally love! I'm currently writing a function. Objective: user can select rows (do not have to be sequential). User clicks on button. UserForm appears with summed results from ONLY rows that he selected. What I have now, well it doesn't work: Sub Button6_Click() Dim i As Integer Dim totalNumbers As Integer Dim aRange As range For Each a In Selection.Areas 'MsgBox "Area " & i & " of the selection contains " & _ ' a.Rows.Count & " rows." &...

Multiple variables to sort and sum, return values<0 with sum refer
Can anyone help me with this one please? I have this table of data. I'd like to be able to write a formula(s) which sums the No according to date and code, but then only returns a sum value (with the code and date in the two adjacent cells) if there is a value greater than 0. Code Ref No Date 1 G/032/05/999 400600 212 19/03/2010 2 G/032/03/001/999 400500 50 19/03/2010 3 G/032/02/001/001 400400 170 19/03/2010 4 G/032/05/999 400600 315 19/03/2010 5 G/032/03/001/999 400500 300 19/03/2010 6 G/032/05/999 400600 202 19/03/2010 7 G/032/03/001/002 40...

How to Combine Data from Several Columns?
Hi Everyone I have attached a file which contains what I need to resolve Basically, I need to combine the data in several columns together int one column. Is there a way I can do it with formulas or vb code? would really appreciate if any experts out there can help me. Thanks and Regards Kelvi Attachment filename: book1.xls Download attachment: http://www.excelforum.com/attachment.php?postid=46105 -- Message posted from http://www.ExcelForum.com Hi Kelvin! Probably the answer will be something like: =A1&" "&B1&" "&C1 ...

sum subform to form
=Sum([Forms]![frmCamPledgeList].[frmCamPledgeListSub].[Amount Pledged]) Form (frmCamPledgeList) with subform frmCamPledgeListSub). Subform has a field named Pledge Amount. I want to put a field on the form that gives me a total of the subform's Amount Pledged. I have tried the above, but I get an #error in the unbound text box. Do you need any more info? Any thoughts on why this does not work? Thanks in advance, Scott -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200912/1 The proper syntax is =Sum([Forms]![frmCa...

Deleting multiple rows from value list
Is there a way to delete multiple rows in a value list for a Text column? I have over 200 rows out of a value list that are duplicates that I need to delete. I can delete them row by row but I'd like to click on the 1st row and shift click on the last row that needs to deleted. Is this possible? Thanks in advance (from a Project newbie) Yes. Select then click on the cut icon. Try it. -Jack Dahlgren "Val" <Val@discussions.microsoft.com> wrote in message news:6596A51E-9C60-46A4-B9AB-AAB335A92906@microsoft.com... > Is there a way to delete multiple ro...

Calculate sum of a field within the query
I have a query that returns the details for a failure record during a specified time period. Where if I search between 1/1/08 and 1/31/08 the query returns the records of all failure records during that period. The row shows the part number and the total parts failed for that record. I need the query to then sum the total part failures for the previous 12 months. So I would see the following: Record # | part # | parts failed | Origination Date| Total Parts failed past 12 months 44444 | x | 4 | 1/2/08 | 200 44445 | Y |1 ...

Creating a Pivot Table
I want to create a pivot table. I have a field named 'Description'. There are various machines within. I would like to have a chart that tells me how many P2 266s that I have, how many, P3 500s.......etc. Unfortunately, I cannot find my answer when I go to the HELP menu of MS Excel. Any help would be appreciated. Thanks a lot. Larry -- lkw441 ------------------------------------------------------------------------ lkw441's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2622 View this thread: http://www.excelforum.com/showthread.php?threadid=37684...

how to make this work if sum=5+n2 then sum becomes the value of s.
I want to get or create a formula in excel or access that allows me to keep a running total of my supplies ie... I have 2 pens, remove one and receive 2. answer in the cell becomes 3 pens then if I zero out the received cell the inventory cell still remembers that I have 3 pens not 4 pens (because I received 2 more pens) and visa versa when I zero out the received cell it remembers I have 3 pens not 1 pen(because I removed 1 pen) I believe the method you suggest is flawed. You have no audit trail. If the number on the sheet doesn't match your actual inventory, how will you figure out...

Pivot Table Problem #3
I have a pivot form in Excel 2000 that I would like to look like this monday tuesday wednesday Tota Sales 20.00 23.00 34.00 77.0 Tax 3.00 6.00 9.00 18.0 instead it looks like thi monday tuesday wednesday Tota Sales 1 1 1 Tax 1 1 1 I want the data field to display the info as it was entered by the user not give me a sum of the field, or a count of the field.. The data source is from a...

help converting table structure
hi - i'm a teacher and am after some help changing the structure of a large table. i am given every few weeks an excel table with the structure Columns: Admin RedMon RedTue RedWed RedThu RedFri BluMon BluTue BluWed BluThu BluFri The Admin is a number assigned to each pupil in the school (1400 on role) In the RedMon, RedTue etc columns is a room number. I could do with the structure of the table being changed to the following Admin Cycle (Red/Blue) Day Room So that each pupil will now have 10 entries (one for each day of the 2 week cycle) ...

=SUM Ranges Do Not Update
I have a Excel 2000 spread sheet, with the following macro to insert new row. Sub InsertRow() ' ' Macro1 Macro ' Macro recorded 4/27/2004 ' 'GoTo label, MyString ActiveSheet.Unprotect Application.Goto Reference:="MyCell" ActiveCell.Select ActiveCell.EntireRow.Insert ActiveCell.Offset(-1, 0).Select ActiveCell.EntireRow.Copy ActiveCell.Offset(1, 0).Select ActiveCell.PasteSpecial xlPasteAll Application.CutCopyMode = False ActiveCell.Select ActiveSheet.Protect DrawingObjects:=True, Contents:=True Scenarios:=True End Sub The problem is that in the "Mycell&qu...

Can DoCmd.TransferDatabase be used to move table to BE
Hi O' Wonderous gurus, Can DoCmd.TransferDatabase move a table from the Front End to the Back End? I've tried the following syntax without success. A msgbox shows the strBackendPath to be correct. DoCmd.TransferDatabase acExport, "Microsoft Access", strBackendPath, acTable, "tblNewTemplate", strNewTbl I'm experimenting with a few things & if I make a small form that I can quickly import into any database I'm developing which has the ability to transfer tables from the front end to the back end & also delete tables then it will b...

Sum value between dates problem driving me mad!
Good Evening All, I am really struggling here, have tried, nested IF's including AND's but am a bit stumped. I am fairly familiar with Arrays, but cannot seem to combine all. I have a data table (as detailed below). (Hopefully, this should be 'pastable' into Excel - it works for me) I simply wish to calculate the expected totals per month. Any help & assistance with this would be most welcome. Cheers, Mathew Note, earliest Start is 01/04/03 Start Finish Day Rate Apr-2003 May-2003 Jun-2003 Jul-2003 Aug-2003 01/04/2003 23.00 01/04/2003 09/07/2003 23.00 ...

pivot table form
i have access 2007 and have created a pivot table form. it works fine for me. the users are using access runtime and when they go to open the form, it displays in data view mode. there doesnt seem to be an option to change to pivot table view. is there a way around this so the users can view the pivot table. thanks ...

Conditional Sum Wizard
Currently I am setting up a sheet and I am using the conditional sum wizard for formulas. Once a formula is created the sytem won't let me copy or change a formula. If I try to copy (Copy, paste special) a formula to another cell, the formula won't work anymore. If I create a formula with the wizard and afterwards change one of the parameters, the formula does not work anymore. Can anyone give me a hint on how I can solve these issues? Thanks. Please don't multi-post - you have an answer elsewhere, relating to use of CSE. Pete On Jan 6, 9:23=A0am, MarcoKoenders <MarcoKo...

Line
I have a table with 4 columns and I want to show three columns as bars on one axis and one as a line on the other axis but the standard format always splits the table into two bars and two lines. Even if I transfer the third column into the primary axis it still stays as a line. Any help will be great. Ta, Michael Hi Michael, Best thing to do is create a Column chart based on all 4 data series. Them select the data series that you want to plot as a line. Right click and pick Chart Type from the popup menu. Pick the appropriate line chart. Michael C wrote: > I have a table with 4 col...

How to use outline data (grouped rows) in a protected worksheet?
I want to protect a sheet containing outline data in grouped rows. After protection, users cannot hide or display the rows using the expansion buttons in the margin. Is using outline data impossible in protected sheets? ...

character size in pivot table cell
present no of char in pivot table cell is <=255. How to increase to an assigned no > 255? AFAIK, there's no way to adjust this limit. wozart wrote: > present no of char in pivot table cell is <=255. > How to increase to an assigned no > 255? -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html ...

Sum Question
I am using Excel 2000 I have the following very simple formula in column j Sheet1 =SUM(B5*H5) I have this copied all the way down to line 40. It shows 0 in all of the cells all the way down. I would like for there to be a way that the cell would not show anything in it UNLESS there was something that it was calculating. For example. I have entered data in column b and column h through line 10, but it still shows 0 in column J all the way down to line 40. I realize that it is showing these 0's b/c I have placed the formula there, but is there a way that it will still calculate but only ...

Multiplie a column by 2
Hey, Got a column I wanne multiplie by 2. It goes from I6 to I2237 so it takes some time if I gotta do it manual. Each cell gotta be multiplie by 2. Hope this made any sense. Thanks -- Message posted from http://www.ExcelForum.com Hi - put the '2' in an empty cell and ocpy this cell - select I6:I2237 - goto 'Edit - Paste Special' and choose 'Multiply' -- Regards Frank Kabel Frankfurt, Germany > Hey, > > Got a column I wanne multiplie by 2. > It goes from I6 to I2237 so it takes some time if > I gotta do it manual. Each cell gotta be multiplie ...