Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Data inside Cell Seperated by comma
Is there any Way to pull data from a cell, then store that in an
array, then split the data and set it in 2 different text boxes?? for instance the name John Monroe MyString = John, Monroe TextBox1.text = John TextBox2.text = Monroe Im not really sure how to do this, My spreadsheet is already fairly large, so im trying to hide multiple items inside a s ingle cell now, MyString will be selected from a combobox, if that helps any :| |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Data inside Cell Seperated by comma
On Nov 7, 8:13 am, wrote:
Is there any Way to pull data from a cell, then store that in an array, then split the data and set it in 2 different text boxes?? for instance the name John Monroe MyString = John, Monroe TextBox1.text = John TextBox2.text = Monroe Im not really sure how to do this, My spreadsheet is already fairly large, so im trying to hide multiple items inside a s ingle cell now, MyString will be selected from a combobox, if that helps any :| Versions of Excel after 97 have the "Split" function that should help. Dim strA as String Dim strB as String Dim strC as String Dim strX as String Dim vntX as Variant strX = "a,b,c" vntX = Split(strX, ",") strA = vntX(0) ' "a" strB = vntX(1) ' "b" strC = vntX(2) ' "c" |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Data inside Cell Seperated by comma
if you are sure that your values will be seperated by a comma then use the
instr function: TextBox1.text = left(cbo.value,instr(1, cbo.value,",")-1) 'pulls all text to the left of the comma TextBox2.text = right(cbo.value,trim(len(cbo.value) - instr(1, cbo.value,","))) 'pulls all text to the right of the comma " wrote: Is there any Way to pull data from a cell, then store that in an array, then split the data and set it in 2 different text boxes?? for instance the name John Monroe MyString = John, Monroe TextBox1.text = John TextBox2.text = Monroe Im not really sure how to do this, My spreadsheet is already fairly large, so im trying to hide multiple items inside a s ingle cell now, MyString will be selected from a combobox, if that helps any :| |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Data inside Cell Seperated by comma
On Nov 7, 8:42 am, Sun Tzu wrote:
On Nov 7, 8:13 am, wrote: Is there any Way to pull data from a cell, then store that in an array, then split the data and set it in 2 different text boxes?? for instance the name John Monroe MyString = John, Monroe TextBox1.text = John TextBox2.text = Monroe Im not really sure how to do this, My spreadsheet is already fairly large, so im trying to hide multiple items inside a s ingle cell now, MyString will be selected from a combobox, if that helps any :| Versions of Excel after 97 have the "Split" function that should help. Dim strA as String Dim strB as String Dim strC as String Dim strX as String Dim vntX as Variant strX = "a,b,c" vntX = Split(strX, ",") strA = vntX(0) ' "a" strB = vntX(1) ' "b" strC = vntX(2) ' "c" Ty It works Perfectly!!! I owe you and this form, It has been an incredible help to me, I appreciate All of you! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Extracting comma seperated data to new sheet | Excel Programming | |||
Exctracting comma seperated data from a single cell | Excel Discussion (Misc queries) | |||
Find the sum of Comma Seperated Values In a Cell | Excel Worksheet Functions | |||
Sum of comma seperated values in cell(Reposting) | Excel Worksheet Functions | |||
Put all cells in one cell seperated by comma | New Users to Excel |