Automatic Report Generation in MS-Excel
I'm working as a personal assistant to the General Manager in a large company. I fix appointments with decision makers in different companies to make a presentation of our products and services. Every evening I have to produce a quick report in MS-Excel from my data that is attached. Is it possible to copy specific data and make a quick report by selecting let's say just the header the 'Name of the decision maker' and the data below it in column A? Thanks for your help.
How to generate quick reports in MS-Excel:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Something will happen if you change the data in column 1
If Target.Column = 1 Then
'Copy the header in the same row but in the 10th column i. e. column J
Target.Offset(0, 0).Copy Destination:=Target.Offset(0, 10)
'Copy the mobile phone number in the same row but to column K
Target.Offset(0, 5).Copy Destination:=Target.Offset(0, 11)
'Copy the Appointment Fixed data to column L in the same row
Target.Offset(0, 6).Copy Destination:=Target.Offset(0, 12)
We can run a VBA code or macro automatically on a worksheet when a specific data range defined by a parameter called 'Target' is changed in the 'Worksheet_SelectionChange Event'.
Watch the video below to learn how to automatically generate reports: