rahulkumar88
New Member
- Joined
- Apr 9, 2011
- Messages
- 16
Hi!
I need to concatenate two columns of data which are selected by the user. So the macro searches through the column headings to locate the required columns and then will concatenate them.
I'm able perform this task by running a loop through all the rows of data. The problem however is that I'm working with a significant amount of data (approx. 35000 rows) and it takes a couple of minutes for the loop to execute.
I was hoping to use a concatenation formula for the first row and then follow that up with the autofill command to work on the rest of the data. That process barely takes a few seconds when you do it manually. Unfortunately I'm unable to give the references for the required columns in the formula.
For example if I use the following formula
Range("J2").Formula = "=F2 & ""_"" & H2"
I want to know how to reference the user defined columns on the RHS.
I'd appreciate any help that you could provide.
Thanks in advance.
I need to concatenate two columns of data which are selected by the user. So the macro searches through the column headings to locate the required columns and then will concatenate them.
I'm able perform this task by running a loop through all the rows of data. The problem however is that I'm working with a significant amount of data (approx. 35000 rows) and it takes a couple of minutes for the loop to execute.
I was hoping to use a concatenation formula for the first row and then follow that up with the autofill command to work on the rest of the data. That process barely takes a few seconds when you do it manually. Unfortunately I'm unable to give the references for the required columns in the formula.
For example if I use the following formula
Range("J2").Formula = "=F2 & ""_"" & H2"
I want to know how to reference the user defined columns on the RHS.
I'd appreciate any help that you could provide.
Thanks in advance.