I have a column like this "2;#Vendor", I want to display only "Vendor".
How can I do this?
|
I have a column like this How can I do this? |
||||
|
|
|
You could either split this column into two, using the "Text to Columns" function of the Data tab in the ribbon menu. You would just have to select Or, if your example meant already two separate columns and
Then you could get the Vendor out, using a VBA formula, which would have to parse the input. Except of course, if Vendor or the number before Vendor follows some specific rules, which you might tap into - like a fixed size. If you have always a format like 001Vendor then you can use this formula:
Edit: Here is a nice solution, that you could use as a worksheet function:
It is using regular expression, which you could use on many other occasions, just by making the pattern dynamic. Here is some documentation on this: http://msdn.microsoft.com/en-us/library/ms974570.aspx And to be fair - I just adapted an example, which I found here: |
||||
|
|
|
cell a1: 2;#Vendor cell b1: +Find("Vendor",a1,1) c1 =+MID(A1,B1,LEN(A1)) =========== Or ================ 2;#Vendor B1 =+MID(A1,Find("Vendor",a1,1),LEN(A1)) |
|||
|