kashif.special2005
Active Member
- Joined
- Oct 26, 2009
- Messages
- 443
Hi,
I have a workbook with multiple sheets with the data around 4 lacs in each sheet, and from vba I am manipulating sheets data, like filling the value in cells or deleting the rows etc and also applying index match formula from VBA.
sheet1:- 40000 rows data with column customer_id
sheet2:- 400000 rows data with multiple columns including column customer_id
In a sheet1 I am fetching some column information from sheet2 with index match function, 1st time it takes some time, I can understand that because of huge data in sheet2, after applying formula I am doing some data deletion in sheet2 from vba, after deleting data the sheet2 have only 30000 rows data.
Now again I am applying index match formula in sheet1, still it is taking that much of time, and I notice that when I go to sheet2 and scroll the row, the row selection bar from right ends at the row number 400000, which is the old row number, now the trick is when I save the workbook, it refreshes the excel memory, and after refresh the excel memory when I go to sheet2 again and scroll the row, this time rows scrolls on actual visible data that is 30000, and the formula index match function fetches the value very fast, because after refreshing the excel memory it takes less data in the memory.
The problem is that I don't want to save the workbook in middle, because the workbook is very heavy and it takes lot of time to save.
my question is how can I refresh excel memory from vba without saving the excel workbook?
I hope I put my query in detail.
Thanks
Kashif
I have a workbook with multiple sheets with the data around 4 lacs in each sheet, and from vba I am manipulating sheets data, like filling the value in cells or deleting the rows etc and also applying index match formula from VBA.
sheet1:- 40000 rows data with column customer_id
sheet2:- 400000 rows data with multiple columns including column customer_id
In a sheet1 I am fetching some column information from sheet2 with index match function, 1st time it takes some time, I can understand that because of huge data in sheet2, after applying formula I am doing some data deletion in sheet2 from vba, after deleting data the sheet2 have only 30000 rows data.
Now again I am applying index match formula in sheet1, still it is taking that much of time, and I notice that when I go to sheet2 and scroll the row, the row selection bar from right ends at the row number 400000, which is the old row number, now the trick is when I save the workbook, it refreshes the excel memory, and after refresh the excel memory when I go to sheet2 again and scroll the row, this time rows scrolls on actual visible data that is 30000, and the formula index match function fetches the value very fast, because after refreshing the excel memory it takes less data in the memory.
The problem is that I don't want to save the workbook in middle, because the workbook is very heavy and it takes lot of time to save.
my question is how can I refresh excel memory from vba without saving the excel workbook?
I hope I put my query in detail.
Thanks
Kashif