I have read the 3 condition.
However, as I copy the macro statement to my file at office, it has problem.
I follow your step, PCt-After.xls is opened.
Pivot table file,LMR _8June.xls is also opened.
I not understand :
1. Workbook with pivot MUST be active
2.While workbook with pivot is being active run code "test"
What is meaning of pivot table active? As my LMR _8June.xls is opened, is it mean "active"? I search in google, there are different answer, someone told it should be active cell.
After I use the code in my office, file, there are two problem,
1. the data can be copied to row 5, however, for column A (date) of PCT-after.xls, the report date can't be copied, for example, A5 become blank cell, rather than date. ( in my case at office)
2. only % of leads auto closed and % of leads unactioned can be copied.
However, other % primary sales of closed leads :maturing mortgage, maturing term deposit and signficiant deposit can;t be copied.
I just copied I28 (% primary sales of closed leads)of pivot table file to macro statement, however, it still doesn't work. I hope to ensure the name fit with macro
I do it several time for testing, after testing, those maturing mortage etc. data can't be copied.
I can't upload the real file because it is company data, I make the sample as same as to real file. (every thing is the same). I find that may be field name has problem. (for example, spacing of % primary sales of closed lead between real file and sample).
I believe the following code may need to be changed. How can I make sure macro can cope with the field name (% primary sales of closed lead)?
attached file (pivot table file) , other % primary sales of closed leads :maturing mortgage, maturing term deposit and signficiant deposit can;t be copied.
Bookmarks