Hi all,
Can someone please help me?
I am trying to write a code to run a macro an update two pivot tables in my workbok. I want the macro to take the values from 3 cells in sheet "invoice" E15:E17 and then update and refresh the pivot tables with that values. I dont want it to change when a cell value in range E15:E17 changes (ChangeByVal), instead I want to run the macro when I do the invoicing.
The workbook have a sheet "Invoice" and in cell range E15:E17 we have values for Customer, Year and month, for exampel: E15 = Customer 1, E16 = 2019, E17 = Januari
Then I have two Pivot tables in the workbook. The Pivottables are named: PInvoice1 In "Sheet 1" and PInvoice2 in "sheet 2".
The two pivottables looks the same: In B15:B17 I want to enter the values from sheet Invoice E15:E17 and then update the pivottables with that values.
IF not all 3 values in sheet invoice E15:E17 are filled or the values dont match in the pivot tables I want the macro to stop and Msg box promt: "You have to enter correct values"
Is this possible? I have tried lots of different solutions and I cant get it to work by myself ?
Can a Master help me?
Thanks in advande
//Daniel
Can someone please help me?
I am trying to write a code to run a macro an update two pivot tables in my workbok. I want the macro to take the values from 3 cells in sheet "invoice" E15:E17 and then update and refresh the pivot tables with that values. I dont want it to change when a cell value in range E15:E17 changes (ChangeByVal), instead I want to run the macro when I do the invoicing.
The workbook have a sheet "Invoice" and in cell range E15:E17 we have values for Customer, Year and month, for exampel: E15 = Customer 1, E16 = 2019, E17 = Januari
Then I have two Pivot tables in the workbook. The Pivottables are named: PInvoice1 In "Sheet 1" and PInvoice2 in "sheet 2".
The two pivottables looks the same: In B15:B17 I want to enter the values from sheet Invoice E15:E17 and then update the pivottables with that values.
IF not all 3 values in sheet invoice E15:E17 are filled or the values dont match in the pivot tables I want the macro to stop and Msg box promt: "You have to enter correct values"
Is this possible? I have tried lots of different solutions and I cant get it to work by myself ?
Can a Master help me?
Thanks in advande
//Daniel