G
Guest
I'm trying to create a small plugin for Excel that will take a column (the
current selected column) and split the text into seperate columns based on
spaces.
I have the code to select the current column (although it is taking the
entire column, not the used range, any suggestions on that as well would be
nice)
Code Snippet
if (Application.ActiveWindow.Selection is Excel.Range)
{
Application.ScreenUpdating = false;
Excel.Range range = Application.ActiveWindow.Selection as Excel.Range;
range = range.EntireColumn;
}
I'm not exactly sure how to proceed from here. Below is a primitive example
of what I'd like to see.
Before
|ColA |
|Foo Bar |
|smarmy |
|Split Me|
After
|ColA |ColB |
|--------|--------|
|Foo |Bar |
|smarmy | |
|Split |Me |
current selected column) and split the text into seperate columns based on
spaces.
I have the code to select the current column (although it is taking the
entire column, not the used range, any suggestions on that as well would be
nice)
Code Snippet
if (Application.ActiveWindow.Selection is Excel.Range)
{
Application.ScreenUpdating = false;
Excel.Range range = Application.ActiveWindow.Selection as Excel.Range;
range = range.EntireColumn;
}
I'm not exactly sure how to proceed from here. Below is a primitive example
of what I'd like to see.
Before
|ColA |
|Foo Bar |
|smarmy |
|Split Me|
After
|ColA |ColB |
|--------|--------|
|Foo |Bar |
|smarmy | |
|Split |Me |