Hi everyone.
Thanks in advance for any help you might provide.
I'm looking to automate the creation of a PDF report which is based on an Excel file that I created. This Excel file (source file) generates figures which I intend to copy into another file (destination file) based on a condition.
To generate the figures, I have 2 variables which I input in 2 different cells:
- Product Model (All, Model1, Model2, Model3, Model4)
- Sales Region (All, Region_A, Region_B, Region_C, Region_D, Region_E, Region_F)
Every time I change the combination of the 2 variables, I have a cell which displays a unique combination (SKU) based on the variables values (All_All, All_Region_A,..., Model2_Region_F,...)
For every combination, based on the SKU, I want to be able to copy the generated data (which is already displayed in a dashboard(-ish) that covers a range: 10 rows by 14 columns) from the Source File and paste it as values into the Destination file. The Destination File already has all SKU possible combinations in one single column to match with the Source File SKU.
I guess my question is: is it at all possible to create a VBA code that does this automatically (including inputting values into the Product Model and Sales Region cells on the Source File)? My limited VBA knowledge tells me it's possible, but it doesn't even give me a starting point to write the code. I've played with the Recording Macro tool but I was not able to cover the dynamic aspect of looking for an SKU on Source file and matching it to the SKU on the Destination file.
I'm happy to provide a dummy file if it helps.
Cheers,
Tiago
Thanks in advance for any help you might provide.
I'm looking to automate the creation of a PDF report which is based on an Excel file that I created. This Excel file (source file) generates figures which I intend to copy into another file (destination file) based on a condition.
To generate the figures, I have 2 variables which I input in 2 different cells:
- Product Model (All, Model1, Model2, Model3, Model4)
- Sales Region (All, Region_A, Region_B, Region_C, Region_D, Region_E, Region_F)
Every time I change the combination of the 2 variables, I have a cell which displays a unique combination (SKU) based on the variables values (All_All, All_Region_A,..., Model2_Region_F,...)
For every combination, based on the SKU, I want to be able to copy the generated data (which is already displayed in a dashboard(-ish) that covers a range: 10 rows by 14 columns) from the Source File and paste it as values into the Destination file. The Destination File already has all SKU possible combinations in one single column to match with the Source File SKU.
I guess my question is: is it at all possible to create a VBA code that does this automatically (including inputting values into the Product Model and Sales Region cells on the Source File)? My limited VBA knowledge tells me it's possible, but it doesn't even give me a starting point to write the code. I've played with the Recording Macro tool but I was not able to cover the dynamic aspect of looking for an SKU on Source file and matching it to the SKU on the Destination file.
I'm happy to provide a dummy file if it helps.
Cheers,
Tiago