View Single Post
  #1   Report Post  
Frantic Excel-er
 
Posts: n/a
Default Macro to sum lines-HELP PLEASE!!!!!!!!!

Hi -

I have been trying to make a macro that will automatically add up all of my
project debits and credits. I have been unable to get this accomplished
without having a run time error if there aren't any projects, or any of the
projects I have specified.

Project numbers look like this: F05GX35509

There are thousands of projects, but they are categorized by the first 3
digits. The first 3 digits could be F05, M04, etc....etc....and they will
change every fiscal year.

Here is what I would like to be able to do....
1. Find the end of the data
2. Insert a formula to a)find the first 3 digits in a 10 digit number from
column c b) sum up the debits in column e and the credits in column f and
place them at the end of the data sequence respectively, and c) show the
difference between credits and debits in column G
3. Label column B (to the left) of the formula what it is...i.e. if it sums
up F05..then I want it to label F05...etc...

Can anyone help with this???? I am not very good at writing code, only
recording it while in excel, and I cannot figure out how to make this look at
the change, but I know it can be done...I am not going to post my code
because I don't think the format is correct at all.....

Thanks in advance....Sara