I am trying to create a pivot table using vba. My first step is to create pivotcaches. I dont know what to do with sourcedata. I looked up online, people are using like SourceData:= "Sheet1!R1C1:R4C3". I can not do it because i have to update worksheet everyday and i have thousands of rows and columns. i am thinking to do like ctrl + a (select all the regions) but i dont know what to do and i tried sourcedata:= sheets("nameofmysheet").range("a2"),currentregion. it wont work either. i dont know what to do now. Help me!