Hi guys
I just found out that one of my old macro's didn't do its job well enough. So I rewrote it - unfortunately I'm not that gifted at VBA, so now I need to charge the computer with a supernova if it should be able to process it!
I found I need a total of 5 nested for...next statements with the following counters:
VB Code:
For i = 5 To 250 For j = i To i + 15 For k = i To i + 15 For l = 5 To 250 For m = l To l + 15 If gSheet.Cells(i, 1).Value = "BFORR" Then If gSheet.Cells(j, 2).Value = "Kundegrupper" Then gSheet.Activate gSheet.Rows(j).EntireRow.Copy tSheet.Activate tSheet.Rows(j).PasteSpecial
The code goes on like this, eventually to include k,l and m as well.
As I said - it takes literally ages (Don't know how long to be precise, but so far +3hours - I can do it manually in 1!)
Is there an alternative to for...next or can I make it leaner in a way??
/Nick




Reply With Quote