excel array formula: split csv content [closed]
Suppose in Excel cell A1 there's content "a,b,c,d,e",
is there a way to write an array formula, so that in B1:B5 will show the split result, i.e. B1 = a, B2 = b, B3 = c, B4 = d, B5 = e?
microsoft-excel worksheet-function
closed as unclear what you're asking by fixer1234, VL-80, bertieb, K7AAY, Pimp Juice IT Dec 20 '18 at 22:39
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
Suppose in Excel cell A1 there's content "a,b,c,d,e",
is there a way to write an array formula, so that in B1:B5 will show the split result, i.e. B1 = a, B2 = b, B3 = c, B4 = d, B5 = e?
microsoft-excel worksheet-function
closed as unclear what you're asking by fixer1234, VL-80, bertieb, K7AAY, Pimp Juice IT Dec 20 '18 at 22:39
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Why do you need in ARRAY formula? it is solvable using common "chain" formulas, and only formula in column B will differs from another ones. And easily solvable using UDF. PS. I think the short answer will be "no way"...
– Akina
Dec 19 '18 at 9:07
You can't have an array formula in one cell that populates a bunch of other cells. If you're looking for a formula in each destination cell, an array formula is irrelevant. So it isn't clear what you're asking. Can you add some pseudo-code to the question to indicate at least the nature of what you're contemplating?
– fixer1234
Dec 19 '18 at 9:29
If you don't mind add a title and convert data as a table, Power Query will be a great choose.
– Lee
Dec 19 '18 at 9:47
stackoverflow.com/questions/25316094/… — found it!
– athos
Dec 19 '18 at 14:04
add a comment |
Suppose in Excel cell A1 there's content "a,b,c,d,e",
is there a way to write an array formula, so that in B1:B5 will show the split result, i.e. B1 = a, B2 = b, B3 = c, B4 = d, B5 = e?
microsoft-excel worksheet-function
Suppose in Excel cell A1 there's content "a,b,c,d,e",
is there a way to write an array formula, so that in B1:B5 will show the split result, i.e. B1 = a, B2 = b, B3 = c, B4 = d, B5 = e?
microsoft-excel worksheet-function
microsoft-excel worksheet-function
edited Dec 19 '18 at 8:43
PeterH
3,49332347
3,49332347
asked Dec 19 '18 at 8:22
athosathos
83271838
83271838
closed as unclear what you're asking by fixer1234, VL-80, bertieb, K7AAY, Pimp Juice IT Dec 20 '18 at 22:39
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as unclear what you're asking by fixer1234, VL-80, bertieb, K7AAY, Pimp Juice IT Dec 20 '18 at 22:39
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Why do you need in ARRAY formula? it is solvable using common "chain" formulas, and only formula in column B will differs from another ones. And easily solvable using UDF. PS. I think the short answer will be "no way"...
– Akina
Dec 19 '18 at 9:07
You can't have an array formula in one cell that populates a bunch of other cells. If you're looking for a formula in each destination cell, an array formula is irrelevant. So it isn't clear what you're asking. Can you add some pseudo-code to the question to indicate at least the nature of what you're contemplating?
– fixer1234
Dec 19 '18 at 9:29
If you don't mind add a title and convert data as a table, Power Query will be a great choose.
– Lee
Dec 19 '18 at 9:47
stackoverflow.com/questions/25316094/… — found it!
– athos
Dec 19 '18 at 14:04
add a comment |
Why do you need in ARRAY formula? it is solvable using common "chain" formulas, and only formula in column B will differs from another ones. And easily solvable using UDF. PS. I think the short answer will be "no way"...
– Akina
Dec 19 '18 at 9:07
You can't have an array formula in one cell that populates a bunch of other cells. If you're looking for a formula in each destination cell, an array formula is irrelevant. So it isn't clear what you're asking. Can you add some pseudo-code to the question to indicate at least the nature of what you're contemplating?
– fixer1234
Dec 19 '18 at 9:29
If you don't mind add a title and convert data as a table, Power Query will be a great choose.
– Lee
Dec 19 '18 at 9:47
stackoverflow.com/questions/25316094/… — found it!
– athos
Dec 19 '18 at 14:04
Why do you need in ARRAY formula? it is solvable using common "chain" formulas, and only formula in column B will differs from another ones. And easily solvable using UDF. PS. I think the short answer will be "no way"...
– Akina
Dec 19 '18 at 9:07
Why do you need in ARRAY formula? it is solvable using common "chain" formulas, and only formula in column B will differs from another ones. And easily solvable using UDF. PS. I think the short answer will be "no way"...
– Akina
Dec 19 '18 at 9:07
You can't have an array formula in one cell that populates a bunch of other cells. If you're looking for a formula in each destination cell, an array formula is irrelevant. So it isn't clear what you're asking. Can you add some pseudo-code to the question to indicate at least the nature of what you're contemplating?
– fixer1234
Dec 19 '18 at 9:29
You can't have an array formula in one cell that populates a bunch of other cells. If you're looking for a formula in each destination cell, an array formula is irrelevant. So it isn't clear what you're asking. Can you add some pseudo-code to the question to indicate at least the nature of what you're contemplating?
– fixer1234
Dec 19 '18 at 9:29
If you don't mind add a title and convert data as a table, Power Query will be a great choose.
– Lee
Dec 19 '18 at 9:47
If you don't mind add a title and convert data as a table, Power Query will be a great choose.
– Lee
Dec 19 '18 at 9:47
stackoverflow.com/questions/25316094/… — found it!
– athos
Dec 19 '18 at 14:04
stackoverflow.com/questions/25316094/… — found it!
– athos
Dec 19 '18 at 14:04
add a comment |
2 Answers
2
active
oldest
votes
Without formula (my favorite) :
Select A1 > Data > Text to Column > Delimited : "," as limiter > Finish ( Choose replace for now..)
Select the result ( 5 cells) > Ctrl+C > r-click on B1, choose transpose. done.
With formula :
B1 ---> =MID(A1,1,FIND(",",$A$1,1)-1)
B2 ---> =MID($A$1,FIND(",",$A$1,1)+1,FIND(",",$A$1,FIND(",",$A$1,1)+1)-FIND(",",$A$1,1)-1)
B3 ---> =MID($A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)-FIND(",",$A$1,FIND(",",$A$1,1)+1)-1)
B4 ---> =MID($A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1)-FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)-1)
B5 ---> =MID($A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1)+1,LEN(A1)-FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1))
key : find the n-th "," in the string.. as "markers" for mid() function.
Hope it helps.
1
you could use=MID($A$1,ROW()*2-1,1)in B1 and drag down, I already gave this as answer but OP did not like it
– PeterH
Dec 19 '18 at 9:38
+1 for effort tho !
– PeterH
Dec 19 '18 at 9:38
thanks for the support.. || btw, I just wan't to make the cell formula to only depends on the contents of A1, and destination independent. || Your formula is pretty neat + cool too!! /(^_^)
– p._phidot_
Dec 19 '18 at 9:44
add a comment |
I would like to suggest a MACRO, which is the best & fastest method, to split Comma separated values from Cell to Rows.

This MACRO will takes data in column A and put the results in column B.
Sub SplitData()
Dim src As Range
Dim result As Variant
For Each src In Range("A:A").SpecialCells(xlCellTypeConstants)
result = Split(src, ",")
With Cells(Rows.Count, 2).End(xlUp)
Range(.Offset(1, 0), .Offset(1 + UBound(result, 1), 0)) = Application.WorksheetFunction.Transpose(result)
End With
Next src
End Sub
N.B.
- At the active sheet press
Alt+F11to open theVB EditorthenCopy & Pastethis code as Standard Module, finallyRUNit.
Range("A:A")for ColumnAand(Rows.Count.2)for ColumnBare editable.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Without formula (my favorite) :
Select A1 > Data > Text to Column > Delimited : "," as limiter > Finish ( Choose replace for now..)
Select the result ( 5 cells) > Ctrl+C > r-click on B1, choose transpose. done.
With formula :
B1 ---> =MID(A1,1,FIND(",",$A$1,1)-1)
B2 ---> =MID($A$1,FIND(",",$A$1,1)+1,FIND(",",$A$1,FIND(",",$A$1,1)+1)-FIND(",",$A$1,1)-1)
B3 ---> =MID($A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)-FIND(",",$A$1,FIND(",",$A$1,1)+1)-1)
B4 ---> =MID($A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1)-FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)-1)
B5 ---> =MID($A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1)+1,LEN(A1)-FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1))
key : find the n-th "," in the string.. as "markers" for mid() function.
Hope it helps.
1
you could use=MID($A$1,ROW()*2-1,1)in B1 and drag down, I already gave this as answer but OP did not like it
– PeterH
Dec 19 '18 at 9:38
+1 for effort tho !
– PeterH
Dec 19 '18 at 9:38
thanks for the support.. || btw, I just wan't to make the cell formula to only depends on the contents of A1, and destination independent. || Your formula is pretty neat + cool too!! /(^_^)
– p._phidot_
Dec 19 '18 at 9:44
add a comment |
Without formula (my favorite) :
Select A1 > Data > Text to Column > Delimited : "," as limiter > Finish ( Choose replace for now..)
Select the result ( 5 cells) > Ctrl+C > r-click on B1, choose transpose. done.
With formula :
B1 ---> =MID(A1,1,FIND(",",$A$1,1)-1)
B2 ---> =MID($A$1,FIND(",",$A$1,1)+1,FIND(",",$A$1,FIND(",",$A$1,1)+1)-FIND(",",$A$1,1)-1)
B3 ---> =MID($A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)-FIND(",",$A$1,FIND(",",$A$1,1)+1)-1)
B4 ---> =MID($A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1)-FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)-1)
B5 ---> =MID($A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1)+1,LEN(A1)-FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1))
key : find the n-th "," in the string.. as "markers" for mid() function.
Hope it helps.
1
you could use=MID($A$1,ROW()*2-1,1)in B1 and drag down, I already gave this as answer but OP did not like it
– PeterH
Dec 19 '18 at 9:38
+1 for effort tho !
– PeterH
Dec 19 '18 at 9:38
thanks for the support.. || btw, I just wan't to make the cell formula to only depends on the contents of A1, and destination independent. || Your formula is pretty neat + cool too!! /(^_^)
– p._phidot_
Dec 19 '18 at 9:44
add a comment |
Without formula (my favorite) :
Select A1 > Data > Text to Column > Delimited : "," as limiter > Finish ( Choose replace for now..)
Select the result ( 5 cells) > Ctrl+C > r-click on B1, choose transpose. done.
With formula :
B1 ---> =MID(A1,1,FIND(",",$A$1,1)-1)
B2 ---> =MID($A$1,FIND(",",$A$1,1)+1,FIND(",",$A$1,FIND(",",$A$1,1)+1)-FIND(",",$A$1,1)-1)
B3 ---> =MID($A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)-FIND(",",$A$1,FIND(",",$A$1,1)+1)-1)
B4 ---> =MID($A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1)-FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)-1)
B5 ---> =MID($A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1)+1,LEN(A1)-FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1))
key : find the n-th "," in the string.. as "markers" for mid() function.
Hope it helps.
Without formula (my favorite) :
Select A1 > Data > Text to Column > Delimited : "," as limiter > Finish ( Choose replace for now..)
Select the result ( 5 cells) > Ctrl+C > r-click on B1, choose transpose. done.
With formula :
B1 ---> =MID(A1,1,FIND(",",$A$1,1)-1)
B2 ---> =MID($A$1,FIND(",",$A$1,1)+1,FIND(",",$A$1,FIND(",",$A$1,1)+1)-FIND(",",$A$1,1)-1)
B3 ---> =MID($A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)-FIND(",",$A$1,FIND(",",$A$1,1)+1)-1)
B4 ---> =MID($A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1)-FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)-1)
B5 ---> =MID($A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1)+1,LEN(A1)-FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,FIND(",",$A$1,1)+1)+1)+1))
key : find the n-th "," in the string.. as "markers" for mid() function.
Hope it helps.
edited Dec 20 '18 at 13:46
answered Dec 19 '18 at 9:28
p._phidot_p._phidot_
57429
57429
1
you could use=MID($A$1,ROW()*2-1,1)in B1 and drag down, I already gave this as answer but OP did not like it
– PeterH
Dec 19 '18 at 9:38
+1 for effort tho !
– PeterH
Dec 19 '18 at 9:38
thanks for the support.. || btw, I just wan't to make the cell formula to only depends on the contents of A1, and destination independent. || Your formula is pretty neat + cool too!! /(^_^)
– p._phidot_
Dec 19 '18 at 9:44
add a comment |
1
you could use=MID($A$1,ROW()*2-1,1)in B1 and drag down, I already gave this as answer but OP did not like it
– PeterH
Dec 19 '18 at 9:38
+1 for effort tho !
– PeterH
Dec 19 '18 at 9:38
thanks for the support.. || btw, I just wan't to make the cell formula to only depends on the contents of A1, and destination independent. || Your formula is pretty neat + cool too!! /(^_^)
– p._phidot_
Dec 19 '18 at 9:44
1
1
you could use
=MID($A$1,ROW()*2-1,1) in B1 and drag down, I already gave this as answer but OP did not like it– PeterH
Dec 19 '18 at 9:38
you could use
=MID($A$1,ROW()*2-1,1) in B1 and drag down, I already gave this as answer but OP did not like it– PeterH
Dec 19 '18 at 9:38
+1 for effort tho !
– PeterH
Dec 19 '18 at 9:38
+1 for effort tho !
– PeterH
Dec 19 '18 at 9:38
thanks for the support.. || btw, I just wan't to make the cell formula to only depends on the contents of A1, and destination independent. || Your formula is pretty neat + cool too!! /(^_^)
– p._phidot_
Dec 19 '18 at 9:44
thanks for the support.. || btw, I just wan't to make the cell formula to only depends on the contents of A1, and destination independent. || Your formula is pretty neat + cool too!! /(^_^)
– p._phidot_
Dec 19 '18 at 9:44
add a comment |
I would like to suggest a MACRO, which is the best & fastest method, to split Comma separated values from Cell to Rows.

This MACRO will takes data in column A and put the results in column B.
Sub SplitData()
Dim src As Range
Dim result As Variant
For Each src In Range("A:A").SpecialCells(xlCellTypeConstants)
result = Split(src, ",")
With Cells(Rows.Count, 2).End(xlUp)
Range(.Offset(1, 0), .Offset(1 + UBound(result, 1), 0)) = Application.WorksheetFunction.Transpose(result)
End With
Next src
End Sub
N.B.
- At the active sheet press
Alt+F11to open theVB EditorthenCopy & Pastethis code as Standard Module, finallyRUNit.
Range("A:A")for ColumnAand(Rows.Count.2)for ColumnBare editable.
add a comment |
I would like to suggest a MACRO, which is the best & fastest method, to split Comma separated values from Cell to Rows.

This MACRO will takes data in column A and put the results in column B.
Sub SplitData()
Dim src As Range
Dim result As Variant
For Each src In Range("A:A").SpecialCells(xlCellTypeConstants)
result = Split(src, ",")
With Cells(Rows.Count, 2).End(xlUp)
Range(.Offset(1, 0), .Offset(1 + UBound(result, 1), 0)) = Application.WorksheetFunction.Transpose(result)
End With
Next src
End Sub
N.B.
- At the active sheet press
Alt+F11to open theVB EditorthenCopy & Pastethis code as Standard Module, finallyRUNit.
Range("A:A")for ColumnAand(Rows.Count.2)for ColumnBare editable.
add a comment |
I would like to suggest a MACRO, which is the best & fastest method, to split Comma separated values from Cell to Rows.

This MACRO will takes data in column A and put the results in column B.
Sub SplitData()
Dim src As Range
Dim result As Variant
For Each src In Range("A:A").SpecialCells(xlCellTypeConstants)
result = Split(src, ",")
With Cells(Rows.Count, 2).End(xlUp)
Range(.Offset(1, 0), .Offset(1 + UBound(result, 1), 0)) = Application.WorksheetFunction.Transpose(result)
End With
Next src
End Sub
N.B.
- At the active sheet press
Alt+F11to open theVB EditorthenCopy & Pastethis code as Standard Module, finallyRUNit.
Range("A:A")for ColumnAand(Rows.Count.2)for ColumnBare editable.
I would like to suggest a MACRO, which is the best & fastest method, to split Comma separated values from Cell to Rows.

This MACRO will takes data in column A and put the results in column B.
Sub SplitData()
Dim src As Range
Dim result As Variant
For Each src In Range("A:A").SpecialCells(xlCellTypeConstants)
result = Split(src, ",")
With Cells(Rows.Count, 2).End(xlUp)
Range(.Offset(1, 0), .Offset(1 + UBound(result, 1), 0)) = Application.WorksheetFunction.Transpose(result)
End With
Next src
End Sub
N.B.
- At the active sheet press
Alt+F11to open theVB EditorthenCopy & Pastethis code as Standard Module, finallyRUNit.
Range("A:A")for ColumnAand(Rows.Count.2)for ColumnBare editable.
answered Dec 19 '18 at 9:58
Rajesh SRajesh S
1
1
add a comment |
add a comment |
Why do you need in ARRAY formula? it is solvable using common "chain" formulas, and only formula in column B will differs from another ones. And easily solvable using UDF. PS. I think the short answer will be "no way"...
– Akina
Dec 19 '18 at 9:07
You can't have an array formula in one cell that populates a bunch of other cells. If you're looking for a formula in each destination cell, an array formula is irrelevant. So it isn't clear what you're asking. Can you add some pseudo-code to the question to indicate at least the nature of what you're contemplating?
– fixer1234
Dec 19 '18 at 9:29
If you don't mind add a title and convert data as a table, Power Query will be a great choose.
– Lee
Dec 19 '18 at 9:47
stackoverflow.com/questions/25316094/… — found it!
– athos
Dec 19 '18 at 14:04