Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I create a code (below) using the macro recorder to refresh the data connection and consolidate the sales figures. My problem is that the code only seems to refresh the data connection, but the data is not consolidating correctly. Now if I go to Data - Consolidate manually it works fine. How can I have my code work correctly that will consolidate properly. I made sure that I clear the contents before doing the consolidation. Can anyone help me. Thank you in advance. Cheers 'Refresh sales connection ActiveWorkbook.Connections("Query from SalesByDepartment").Refresh 'Consolidate revenue 'Revenue worksheet consolidation Worksheets("Revenue").Range("A3").Consolidate Sources:=Array( _ "'Z:\General Folder\Sales\Budget\[Revenue 2009.xlsm]Revenue'!R3C6:R40000C9" _ , _ "'Z:\General Folder\Sales\Budget\[Revenue 2009.xlsm]Revenue'!R3C11:R20000C14" _ ), Function:=xlSum, TopRow:=False, LeftColumn:=True, CreateLinks:=False |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Linked sheets not updating properly with dual monitors | Excel Worksheet Functions | |||
Excel - sumif not updating properly | Excel Discussion (Misc queries) | |||
Area Chart not refreshing/updating properly | Excel Programming | |||
Area Chart not refreshing/updating properly | Charts and Charting in Excel | |||
PivotChart not updating properly | Excel Discussion (Misc queries) |