Looping without overwriting data VBA

  • Hi everybody!

    I am trying to copy a diarydata (data that is created daily) from one sheet to another sheet where I will group the data of everyday, so I will be able to pivot all the information. I already have reached my poor knowledge of VBA. So, the code I have worked do transfer the information, however the data can not be group because it is overwrited when the loop works. Please, see the excel attached (Module 6 VBA).


    Best regards


    Jorge!

  • Either use the Worksheet .Name property or the Worksheet .CodeName property. Mixing and matching can only lead to trouble if they become 'unsynced'. In other words, if you ask for the next row to paste into from the worksheet codename Sheet1, then use the worksheet codename Sheet1 to identify the destination of your paste. There is nothing in your code that guarantees that the ActiveSheet property is the worksheet identified by Sheet1 codename, nor is there any guarantee that either is the worksheet with a name tab that says Sheet1.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!