Marco from hell!

Soldato
Joined
8 Oct 2003
Posts
2,882
Location
Glasgow
:confused:

Hi im basically totally stuck at trying to speed this up :)

I have a Spreadsheet, i am trying to macro thats causing me troubles

Basically i have 39k est employees :) down the way and 91+/-(this changes) columns across the way, the columns are of 11 types which are numbered like below(another marco does this from a list of 133 types), where each type matches i can add the values so removing some of the cloumns

EXAMPLE

IMPORTED DATA

EMPNO 1000 1000 2000 3000 3000 2000 1000 2000 2000 -> so on forever

87342 38.00 -12.12 3.00 400.00 2.00 -2.00 123.24 12.11 123

My current marco is using activeCell.offset to go though all 91 colums and total all of theses values to i end up with the following

It is also using a lot of IF statments like below

*EXAMPLE

If activeCell.value = "1000" then
Add to 1000 total
end if

**** CURRENT OUTPUT

EMPNP 1000 2000 3000

87342 total total total

This is taking an age to run as im basically not doing this the most effient way so can anyone give me any advise. I am going try using an array but i am unsure how, i can post better examples of my code when i am at work tomorrow.

Thanks for looking Kevin!
 
Back
Top Bottom