Sissyfoo
12-07-2005, 05:44 PM
Hello,
I was wondering if anyone could help me out with this problem. At first it seems quite simple but it is driving me up the wall.
Basically, I have 4 sheets with staff names and company names in columns A and B. The 4 sheets represent financial quarters so, for the most part, the staff and company names are the same on all 4 sheets but occassionaly someone is added or removed (because they got their lazy butts fired). I also have a sheet at the end called 'Brickwall' which is intended as a sort of commentary sheet with the staff and company names in columns A and B and then another 13 or so columns (up to column O) which contain random numbers or commentary.
What I wanted to do was write a script that would sort through all 4 quarter sheets and extract the unique names and place them all in brickwall sheet in alphamabetical order. I have a nice little collection script which does that rather nicely. Unfortunately, doofus that I am, the brickwall sheet only updates columns A and B and leaves C - O alone. This means that if someone adds a new company or staff name in one of the quarters and then runs the macro, a new row will be inserted into columns A + B but NOT for the rest of the columns. This means the pre-existing data in columns C - O will very quickly go out of sync with the data in columns A and B.
I tried to remedy this by expanding the macro to include all 15 columns but this didn't work. I then wrote more code to ... well, let's just say that by the time I got it to work properly the script had become the most bloated and diseased pile of crap you will EVER see. Running the macro took a good 10 seconds and it was, in essence, useless because it didn't really act as a time saver but more of a hinderance.
Does anyone have any ideas on what I could do to make this work? I am completely stumped. :(
I was wondering if anyone could help me out with this problem. At first it seems quite simple but it is driving me up the wall.
Basically, I have 4 sheets with staff names and company names in columns A and B. The 4 sheets represent financial quarters so, for the most part, the staff and company names are the same on all 4 sheets but occassionaly someone is added or removed (because they got their lazy butts fired). I also have a sheet at the end called 'Brickwall' which is intended as a sort of commentary sheet with the staff and company names in columns A and B and then another 13 or so columns (up to column O) which contain random numbers or commentary.
What I wanted to do was write a script that would sort through all 4 quarter sheets and extract the unique names and place them all in brickwall sheet in alphamabetical order. I have a nice little collection script which does that rather nicely. Unfortunately, doofus that I am, the brickwall sheet only updates columns A and B and leaves C - O alone. This means that if someone adds a new company or staff name in one of the quarters and then runs the macro, a new row will be inserted into columns A + B but NOT for the rest of the columns. This means the pre-existing data in columns C - O will very quickly go out of sync with the data in columns A and B.
I tried to remedy this by expanding the macro to include all 15 columns but this didn't work. I then wrote more code to ... well, let's just say that by the time I got it to work properly the script had become the most bloated and diseased pile of crap you will EVER see. Running the macro took a good 10 seconds and it was, in essence, useless because it didn't really act as a time saver but more of a hinderance.
Does anyone have any ideas on what I could do to make this work? I am completely stumped. :(