View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alfredo_CPA Alfredo_CPA is offline
external usenet poster
 
Posts: 45
Default Manipulating data

Any ideas how to solve this?
I have a database like this (starting in column A):

Date Ref # G/L Desc Amount Desc
5/1/2009 11000 ap 10 ma
5/1/2009 21020 act 20 rf
5/1/2009 21022 fs (30) pz
5/2/2009 41000 or (5) na
5/2/2009 41000 lk 6 lo
5/2/2009 21020 cr 1 co
5/2/2009 21022 ty (2) je
5/3/2009 76140 wt 10 aa
5/3/2009 21029 pn (10) pa

I'm working in excel 2003
The database has all the days of the month (sorted by day)
The number of rows per day can be different

My data after running the macro should look like this:
Date Ref # G/L Desc Amount Desc
5/1/2009 R 5/1/2009 3 11000 ap ma 10 ma
5/1/2009 R 5/1/2009 3 21020 act rf 20 rf
5/1/2009 R 5/1/2009 3 21022 fs pz (30) pz
5/2/2009 R 5/2/2009 4 41000 or na (5) na
5/2/2009 R 5/2/2009 4 41000 lk lo 6 lo
5/2/2009 R 5/2/2009 4 21020 cr co 1 co
5/2/2009 R 5/2/2009 4 21022 ty je (2) je
5/3/2009 R 5/3/2009 2 76140 wt aa 10 aa
5/3/2009 R 5/3/2009 2 21029 pn pa (10) pa

What I need in my macro:
For each day: Identify the days that are the same and put that number in the
column "#"
Put a label in the "Ref" column for the same days (e.g. R 5/1/2009)
Concatenate the two descriptions (e.g. ap ma)
I also need this: the sum of every individual day (column amount) shold be
zero. If an error is done by the person sending the information the amount
will be different than zero, in that case I need the macro to skip the days
that don't add zero (a manual correction should be done)

Any ideas??

Thanks