98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Concatenate in VBA
Concatenate in VBA
Resolved · High Priority · Version 2007
Kate has attended:
Access Introduction course
Access Intermediate course
Concatenate in VBA
I need to use VBA in order to input a formula in each cell of a column (or just the result of a formula) which uses Left/Right and Mid in order to select the components to be concatenated.
In Excel this would look like:
=CONCATENATE(LEFT(B2,2),":",MID(B2,3,2),":",RIGHT(B2,2))
in VBA I need to replace B2 with Cells(intRowCount, 6) where intRowCount increases up to the total row count.
I also want to apply two separate formulae, one if the value of B2 is greater than 2359.59 and one if it is lower.
Unfortunately I keep getting syntax errors.
Please help!
RE: Concatenate in VBA
Hi Kate
Thanks for your question
There is no VB concatenate function. Instead I suggest the following
LEFT(B2,2),&":",&MID(B2,3,2)&,":",&RIGHT(B2,2)
This should create the string you are looking for
Regards
Stephen
Sun 4 Apr 2010: Automatically marked as resolved.
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Create your own custom list on Excel 2010!If you know how to use the auto-fill option on Excel then why not create your own customs lists? |