koolaid929
New Member
- Joined
- Feb 17, 2020
- Messages
- 4
- Office Version
- 2016
- Platform
- Windows
Hello all,
I'm a rookie when it comes to VBA, so I apologize is this seems remedial. I'm trying to setup VBA code to that will Concatenate a list of numbers that will then be used in a SQL query. I was able to record the macro below, but the list of numbers can change to more or less and I need help updating the code so it will always concatenate all the numbers in the list.
Selection.FormulaArray = _
"=LEFT(CONCAT(""'""&RC[-3]:R[6]C[-3]&""',""),LEN(CONCAT(""'""&RC[-3]:R[6]C[-3]&""',""))-1)"
Also asked here Concatenate a List of Numbers using a FormulaArray but the List can vary
I'm a rookie when it comes to VBA, so I apologize is this seems remedial. I'm trying to setup VBA code to that will Concatenate a list of numbers that will then be used in a SQL query. I was able to record the macro below, but the list of numbers can change to more or less and I need help updating the code so it will always concatenate all the numbers in the list.
Selection.FormulaArray = _
"=LEFT(CONCAT(""'""&RC[-3]:R[6]C[-3]&""',""),LEN(CONCAT(""'""&RC[-3]:R[6]C[-3]&""',""))-1)"
Also asked here Concatenate a List of Numbers using a FormulaArray but the List can vary
Last edited by a moderator: