Hi can anyone help with adding formula's to a macro?
I copy data with a Userform from columns ("A2:A" & ", D2:K) to columns ("AI2:AQ)
Column A2:A has Dates
Column D2:D has count values from 1 -12000
Columns E2:K has Data
I am try to find a way of adding formula's to columns ("AI2:AQ) after data has been copied.
ie
If I have copied data from ("A11" & ", D11:K11") to columns ("AI2:AQ2)
Column "AJ2" value would be 10
Then add formula's -
Column "AI2" = "A11"
Column "AJ2" = "D11"
Colums "AK2:AQ2" = "E11:K11"
And then with the data in cells "AK2:AQ2" a formula to arrange the data small to large.
So if the data copied from cells "E2:K2" ie is (5,3,6,7,1,2,4) the formula arranges the data in cells "AI2:AQ2" from (5,3,6,7,1,2,4) to (1,2,3,4,5,6,7)
Any help would be appreciated
Regards
pwill
Edit: Sorry I should have said Sheet1
The code I am using was kindly provided by Roderick_E in another thread 'User Form to Copy Rows
I copy data with a Userform from columns ("A2:A" & ", D2:K) to columns ("AI2:AQ)
Column A2:A has Dates
Column D2:D has count values from 1 -12000
Columns E2:K has Data
I am try to find a way of adding formula's to columns ("AI2:AQ) after data has been copied.
ie
If I have copied data from ("A11" & ", D11:K11") to columns ("AI2:AQ2)
Column "AJ2" value would be 10
Then add formula's -
Column "AI2" = "A11"
Column "AJ2" = "D11"
Colums "AK2:AQ2" = "E11:K11"
And then with the data in cells "AK2:AQ2" a formula to arrange the data small to large.
So if the data copied from cells "E2:K2" ie is (5,3,6,7,1,2,4) the formula arranges the data in cells "AI2:AQ2" from (5,3,6,7,1,2,4) to (1,2,3,4,5,6,7)
Any help would be appreciated
Regards
pwill
Edit: Sorry I should have said Sheet1
The code I am using was kindly provided by Roderick_E in another thread 'User Form to Copy Rows
Last edited by a moderator: