G
Guest
I have a large table with the columns=
State; PolicyNumber; Age; ClaimAmount
I want to create 50 tables and export these into excel.
I have a make table query that takes the large table and sums the claim
amount by age. So for Texas the table would look like
State; Age; SummedClaimAmount
I need to do this for each state and
I want to automate the process because typing in CT run query, then MA run
query, etc... gets very tedious.
Is it possible to create a macro to automate this.
I am thinking it would look like something like
Sub()
Dim StateName(50) as Array
StateName(1) = "CT", ...
For i = 1 to 50
run query on StateName(i)
Ouput table into excel with filename = StateName(i)&"StateTable.xls"
Next i
End Sub
Thanks for your help.
State; PolicyNumber; Age; ClaimAmount
I want to create 50 tables and export these into excel.
I have a make table query that takes the large table and sums the claim
amount by age. So for Texas the table would look like
State; Age; SummedClaimAmount
I need to do this for each state and
I want to automate the process because typing in CT run query, then MA run
query, etc... gets very tedious.
Is it possible to create a macro to automate this.
I am thinking it would look like something like
Sub()
Dim StateName(50) as Array
StateName(1) = "CT", ...
For i = 1 to 50
run query on StateName(i)
Ouput table into excel with filename = StateName(i)&"StateTable.xls"
Next i
End Sub
Thanks for your help.