xenium
asked on
Appending a constant to an array in google sheets
hi,
This should be easy. In google sheets, I have an array in columns A & B as follows:
Ref Desc
1 one
2 two
3 three
4 four
5 five
Example: https://docs.google.com/spreadsheets/d/1OVwUpodKWxgEsUuLr4wW1K_srW90ZjgvvMoZwmt1fdQ
I can copy this array by using formula ={A:B}
How can I append a constant value, eg 'mysource' so that the output is:
Ref Desc mysource
1 one mysource
2 two mysource
3 three mysource
4 four mysource
5 five mysource
Thanks
This should be easy. In google sheets, I have an array in columns A & B as follows:
Ref Desc
1 one
2 two
3 three
4 four
5 five
Example: https://docs.google.com/spreadsheets/d/1OVwUpodKWxgEsUuLr4wW1K_srW90ZjgvvMoZwmt1fdQ
I can copy this array by using formula ={A:B}
How can I append a constant value, eg 'mysource' so that the output is:
Ref Desc mysource
1 one mysource
2 two mysource
3 three mysource
4 four mysource
5 five mysource
Thanks
ASKER
Here's another botch that works.. is this as good as it gets?
=ARRAYFORMULA({A1:B6, "mysource" & LEFT(A1:A6,0) })
=ARRAYFORMULA({A1:B6, "mysource" & LEFT(A1:A6,0) })
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Reason for choosing own solution: it works, and no other solutions were forthcoming.
ASKER
={array_constrain(A:B,coun
This method requires that column A is fully populated.