Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 4
Default merging duplicate donors and donation amounts from different years

hi i see lots of posts about merging but could find none that really address my problem.
im trying to organize a 10k+ name donor data base list that has names of donors, with how much they have donated, every year in yearly increments starting from 2006..... the problem is that excel displays the list as follows
(see attachment below)

what i need it to display is
bob $500 600 800
jack 100 400 300

none of the merging commands that i have tried helped
if anybody can help that would be much appreciated thanx so much!!
Attached Images
File Type: pdf donor list sample.pdf (6.8 KB, 71 views)
  #2   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by eli_ View Post
hi i see lots of posts about merging but could find none that really address my problem.
im trying to organize a 10k+ name donor data base list that has names of donors, with how much they have donated, every year in yearly increments starting from 2006..... the problem is that excel displays the list as follows
(see attachment below)

what i need it to display is
bob $500 600 800
jack 100 400 300

none of the merging commands that i have tried helped
if anybody can help that would be much appreciated thanx so much!!
Hi, perhaps with some anonymised sample data in an Excel file it would be easier to help you out with this...


S.
  #3   Report Post  
Junior Member
 
Posts: 4
Default

sure i attached a pdf ..thnx so much
Attached Images
File Type: pdf donor list sample.pdf (6.8 KB, 81 views)
  #4   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by eli_ View Post
sure i attached a pdf ..thnx so much
Could you post an actual .xls or .xlxs file? You'll have to add it to a zip file before posting as this forum won't allow Excel files unless added to a .zip file.

Include a bit of and explanation of how you need it to get from one format (i.e. a list of data) to the new format (i.e. the table in your .pdf) and you'll get a much quicker answer.

S.
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 74
Default merging duplicate donors and donation amounts from different years

eli_ explained :
sure i attached a pdf ..thnx so much


You did really!

What solution are looking for: Functions or VBA?

Bruno




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 74
Default merging duplicate donors and donation amounts from different years

Do you want something like this:

2006-2007 2007-2008 2008-2009 2009-2010 2010-2011 2011-2012
bob 1000 1000
jack 500 1000 500 500 600

???


Again my first question:
are you looking for a solution with formulas or with code?

Bruno


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 74
Default merging duplicate donors and donation amounts from different years

Bruno Campanini formulated the question :
Do you want something like this:

2006-2007 2007-2008 2008-2009 2009-2010 2010-2011
2011-2012 bob
1000 1000 jack 500 1000
500 500 600

???


Again my first question:
are you looking for a solution with formulas or with code?

Bruno


Sorry, contents unreadable!

bob 1000 1000
jack 500 1000 500 500 600

Bruno


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 74
Default merging duplicate donors and donation amounts from different years

Bruno Campanini laid this down on his screen :
Bruno Campanini formulated the question :


Again my first question:
are you looking for a solution with formulas or with code?

Bruno


In the mean time:
===================================
Public Sub NewLayout()
Dim SourceRange As Range, TargetRange As Range
Dim NameColl As New Collection, TargetArray()
Dim NumberOfYears As Integer, NumberOfRecords As Long
Dim S As Currency, SS As Currency, i, j, k

' Definition ------------------
Set SourceRange = [Sheet1!K16]
Set TargetRange = [Sheet1!K27]
NumberOfYears = 6
' -----------------------------

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Set SourceRange = SourceRange.Resize(SourceRange.End(xlDown) _
.Row - SourceRange.Row + 1)
NumberOfRecords = SourceRange.Rows.Count

For Each i In SourceRange
On Error Resume Next
NameColl.Add i, CStr(i)
On Error GoTo 0
Next
ReDim TargetArray(1 To NameColl.Count, 1 To NumberOfYears)

For i = 1 To NumberOfRecords
For k = 1 To NumberOfYears
For j = 1 To NameColl.Count
If SourceRange(i, 1) = NameColl(j) Then
TargetArray(j, k) = TargetArray(j, k) _
+ SourceRange(i, k + 1)
End If
Next: Next: Next

For j = 1 To NameColl.Count
TargetRange(j, 1) = NameColl(j)
For k = 1 To NumberOfYears
If j = 1 Then
TargetRange(0, k + 1) = SourceRange(0, k + 1)
TargetRange(0, 1) = SourceRange(0, 1)
TargetRange(0, NumberOfYears + 3) = "Totals"
End If
TargetRange(j, k + 1) = TargetArray(j, k)
S = S + TargetArray(j, k)
Next
TargetRange(j, NumberOfYears + 3) = S
SS = SS + S: S = 0
Next
TargetRange(NameColl.Count + 1, NumberOfYears + 3) = SS
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True

End Sub
=========================================

Bruno


  #9   Report Post  
Junior Member
 
Posts: 4
Default

Quote:
Originally Posted by Spencer101 View Post
Could you post an actual .xls or .xlxs file? You'll have to add it to a zip file before posting as this forum won't allow Excel files unless added to a .zip file.

Include a bit of and explanation of how you need it to get from one format (i.e. a list of data) to the new format (i.e. the table in your .pdf) and you'll get a much quicker answer.

S.
sure....the format that im trying to get is to merge all the donations from one name to a single row (as u see now for every year that a donation is given it is recorded on another row)
Attached Files
File Type: zip sample donor list.zip (5.9 KB, 34 views)
  #10   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by eli_ View Post
sure....the format that im trying to get is to merge all the donations from one name to a single row (as u see now for every year that a donation is given it is recorded on another row)
If this is what you mean, then this is one way of doing it.

But I'd have thought a simple pivot table would have been far easier!
Attached Files
File Type: zip sample donor list.zip (6.3 KB, 31 views)

Last edited by Spencer101 : August 14th 12 at 08:11 PM


  #11   Report Post  
Junior Member
 
Posts: 4
Default

Quote:
Originally Posted by Spencer101 View Post
If this is what you mean, then this is one way of doing it.

But I'd have thought a simple pivot table would have been far easier!
like that but the donations per year is important ...i already have a total list..is there a way to keep the single row per name with the different amounts donated over the different years?
  #12   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by eli_ View Post
like that but the donations per year is important ...i already have a total list..is there a way to keep the single row per name with the different amounts donated over the different years?
Like this?

But again, a pivot table would probably be even easier.
Attached Files
File Type: zip sample donor list2.zip (6.5 KB, 44 views)

Last edited by Spencer101 : August 14th 12 at 09:41 PM
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
Dollar amounts aren't merging from Excel into a Word document... Sharon Excel Discussion (Misc queries) 3 February 19th 09 02:41 PM
Merging duplicate lines in a Database Darren Excel Discussion (Misc queries) 1 November 27th 08 07:12 PM
Combining and merging duplicate data. Darren Excel Discussion (Misc queries) 2 November 27th 08 02:38 PM
Look up duplicate amounts with unique batch numbers JHL Excel Worksheet Functions 3 May 6th 08 11:14 PM
Merging duplicate rows mattis2k[_3_] Excel Programming 4 November 15th 03 07:25 PM


All times are GMT +1. The time now is 12:16 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"