Hi Guys,
I have cell with a lof of values like:
Screenshot_19.png
I want to take pairs and get 2 columns result for each of them.
Screenshot_20.png
Please also find sample workbook.
Please help,
Best,
Jacek
Hi Guys,
I have cell with a lof of values like:
Screenshot_19.png
I want to take pairs and get 2 columns result for each of them.
Screenshot_20.png
Please also find sample workbook.
Please help,
Best,
Jacek
Adjust the output.
Please Login or Register to view this content.
Wow awesome,
thank you!
Jindon i can not decode how this pattern is working.
* - matching preceding element
[] - any signs between brackets
\u = what is it ?
00 = ??
A = ??
0 = ??
Please help,
Best,
Jacek
Actually pattern is simply
Your space is "Non-break-space" which is ChrW(160) and the unicode is U+00A0.Please Login or Register to view this content.
In regexp, you can have unicode after \u.
So it means space(s) or non space with "non-breake-space" followed by space(s) or none space.
The code replaces such group to Chr(2).
Understand?
Last edited by jindon; 09-06-2018 at 09:33 AM.
Perhaps next code more at the human level
If you want to loop explain the data lay out
Please Login or Register to view this content.
Last edited by PCI; 09-06-2018 at 01:17 PM.
- Battle without fear gives no glory - Just try
@ PCI
Yeah, I agree ... jindon is not "OF THIS WORLD" one can only aspire ...Perhaps next code more at the human level
Good Luck...
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
Also....Add a comment if you like!!!!
And remember...Mark Thread as Solved...
Excel Forum Rocks!!!
Hi Guys,
sorry for my late answer.
Jindon is not of this world but i love his macros and learning from him. What he learned me (like array lists and dictionary within dictionary) i am using now
PCI thank you, what is chr 160? Non breaking space ? it is like a lot of spaces?
what does it mean?I = 1: J = 1
Jindon
not exactly. So this code: U+00A0 is non breaking space here? (chr160)?Understand?
what each element mean here?( *
what does it mean?+
Hmm which element is for what?So it means space(s) or non space with "non-breake-space" followed by space(s) or none space.
Thank you!
Best,
Jacek
" *\u00A0 *" = equivalent to " *" & ChrW(160) & " *" as \u00A0 = ChrW(160) which is non breaking space.
When character(s) are are within a brackets, it is a character group.
( *\u00A0 *)+ and the last + means 1 or more consecutive preceding character/character set.
So that it matches to the big space within you string.
You can see the result in msgbox when it replaces like this.
As chr(2) is not printable, so used "@" instead.
Please Login or Register to view this content.
thank you Jindon very much!
it is clear now.
Best,
Jacek
This the character separator used between text: 160 is the ASCII codewhat is chr 160
I equal 1 and J equal 1, the ":" permits to "stick" statement on the same lineI = 1: J = 1
a nice !
thank you PCI
You are welcome, we are here to learn and to share
Last edited by PCI; 09-09-2018 at 03:44 AM.
Last edited by jindon; 09-08-2018 at 11:45 PM.
Hi Guys,
i have new data. What pattern should i have using object:
to split the text?Please Login or Register to view this content.
In attachment sample workbook.
Thank you,
Best,
Jacek
Screenshot_29.png
Last edited by jaryszek; 09-24-2018 at 11:29 AM.
No idea..............
jindon,
why ?
Best,
Jacek
How do you convert data in Sheet2 to format in result sheet for yourself?
aaa no no,
i only want to split cell A1 like you did in first case.
So result should be:
DAL09 - Dallas first row
Dal10 - Dallas second row etc.
Best,
Jacek
The no need of Regular Expressions.
Please Login or Register to view this content.
thank you very much jindon.
why did you use trim with $ ?
Best,
Jacek
While you are in vbe, got to [view] - [Object Browser]
Enter trim$ in serach dropdown.
You will see functions that has $ and without $.
If you click on Trim, it says Function Trim(String)
while Trim$, Function Trim$(String As String) As String
Means function with $ returns string type explicitly, and said it would be a bit faster.
thank you !
Nice explanation !
Best,
Jacek
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks