' Trim and copy from Source to Target Array. ReDim vntT(1 To UBound(vntS) + 1, 1 To 1) VntS = Split(SplitCellRange.Cells(1, 1), Delimiter) ' Split first cell in SplitCellRange by Delimiter into Source Array. Sub SplitToRows(SplitCellRange As Range, Optional Delimiter As String = ",") Range(cStrCell).Column).End(xlUp)).ClearContents Range(Range(cStrCell).Offset(1), Cells(Rows.Count, _ ' Clear contents of data below Split Range. If Target.Address = Range(cStrCell).Address Then Range(cStrCell), cStrDel)) + 2)) Is Nothing Then If Not Intersect(Target, Range(cStrCell).Resize(UBound(Split( _ ' Check if changed cell range is contained in Split Range. Private Sub Worksheet_Change(ByVal Target As Range)Ĭonst cStrCell As String = "A1" ' Split Cell Range AddressĬonst cStrDel As String = "," ' Split Delimiter The change of any cell in the Split Data Range is not possible.Ĭopy the following code to the desired sheet code window e.g.Split Data Range and delete all data below. When changing the data in the Split Cell Range, the solution willĬopy the delimited data below the Split Cell Range into the.In Worksheet_Change you can choose (provide) the Split Cell RangeĪddress containing the delimited data ( cStrCell) and the Split.Functions do not work in the way you described the possible functionality in your question, but here is a 'similar' VBA solution using the Worksheet Change Event.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |