Thanks for any help!
I am trying to speed up a process for my job where instead of copying and pasting all of the values into one field, I can run a macro to put it all into one field for me.
How the field comes to me is with a merged cell of "Responsibility / Duty:" and all the fields to the right need to be included. Then there could be a few rows in between and needs to have all of those values included as well.
<tbody>
</tbody>
I've pulled a concatinate all cell values function, but it's selecting the range of cells that I'm unsure the best method of doing. Any help is appreciated!
I am trying to speed up a process for my job where instead of copying and pasting all of the values into one field, I can run a macro to put it all into one field for me.
How the field comes to me is with a merged cell of "Responsibility / Duty:" and all the fields to the right need to be included. Then there could be a few rows in between and needs to have all of those values included as well.
1 | |
Responsibility / Duty: | 2 |
3 | |
Other field | |
1 | |
Responsibility / Duty: | 2 |
3 |
<tbody>
</tbody>
I've pulled a concatinate all cell values function, but it's selecting the range of cells that I'm unsure the best method of doing. Any help is appreciated!
PHP:
Function ConcatinateAllCellValuesInRange(sourceRange As Excel.Range) As String
Dim finalValue As String
Dim cell As Excel.Range
For Each cell In sourceRange.Cells
finalValue = finalValue + CStr(cell.Value) + Chr(10)
Next cell
ConcatinateAllCellValuesInRange = finalValue
End Function