View Full Version : complete page numbers
moblid
02-12-2018, 02:36 PM
Dear Forum members,
I have a large set of page numbers in elided formats of two kinds. One always provides the last two digits, e.g., 55-59, 123-27, 234-78. The second retains only the last digit, e.g, 55-9, 123-7, 234-8. in both cases I would like to expand these to 55-59, 123-127, 234-278. the page numbers appear in long comma delimited strings and I would like the output to be comma delimited too.
Your help is much appreciated.
DocAElstein
02-12-2018, 03:02 PM
Hello moblid,
Welcome to excelfox. :)
I do not understand your question
I do not think that anyone can help you if you do not explain much more fully what help you need.
You have said that you have this:
55-59, 123-27, 234-78.
and this
55-9, 123-7, 234-8
Then you say it should become this:
55-59, 123-127, 234-278
????
Possibly I see some logic. But I am not sure.
We cannot guess where your data is and where you want your final output to go.
Please remember that you know exactly all your project details.
We have no idea.
You must give us much much more clear detail of your current data situation and what finally you want.- You must tell us where the data is and where it should go.. etc.. etc… etc..
You have not given us anywhere close to the information we need in order to try to help you.
Alan
moblid
02-12-2018, 03:25 PM
Sorry, will try to do better.
Column A has the following elided numbers:
A1: 3, 6-8, 24-56, 78, 123-45, 254-65
A2: 55-6, 122-6, 156-68
A3: 45, 255-8, 212-24
I need the following non elided numbers in column B:
B1: 3, 6-8, 24-56, 78, 123-145, 254-265
B2: 55-56, 122-126, 156-168
B3: 45, 255-258, 212-224
Please note that sometimes the original elision is to the last two digits (as in A1) and sometimes to the last digit (as in A2, A3), but in both cases I need output as in B1, B2, B3.
Moshe
DocAElstein
02-12-2018, 03:44 PM
OK Moshe,
Thanks,
I think I understand now
I will take a look when I have time.
If I have a solution, then I will post it later
Alan
moblid
02-12-2018, 05:11 PM
Thank you very much. I now understand I shouldn't have done this but in the meanwhile I posted also here:
https://www.excelforum.com/excel-programming-vba-macros/1219601-fill-out-shortened-numbers.html
OK Moshe,
Thanks,
I think I understand now
I will take a look when I have time.
If I have a solution, then I will post it later
Alan
moblid
02-12-2018, 05:23 PM
ok, I received an answer in that forum. Thanks very much for your time and for making me clarify the question. Moshe
DocAElstein
02-12-2018, 08:46 PM
Hello Moshe,
You are welcome, and thanks for the update.
jindon is a VBA genius! or maybe he has good library of many codes and for this reason is very fast. I have experienced this many times at excelforum!
I started my solution, so out of interest I finished it.
But almost certainly the code form jindon is the one to use.
Here is my solution, - Here is my code for you:
http://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=10496#post10496
The code will take something like this:_....
Row\Col
A
B
134-5
23, 6-8, 24-56, 78, 123-45, 254-65
355-6, 122-6, 156-68
445, 255-8, 212-24
5
_.... and give you something like this:
Row\Col
A
B
134-534-35
23, 6-8, 24-56, 78, 123-45, 254-653, 6-8, 24-56, 78, 123-145, 254-265
355-6, 122-6, 156-6855-56, 122-126, 156-168
445, 255-8, 212-2445, 255-258, 212-224
5
_.__________________________
( Now I will study the solution form jindon and see if I can understand it ! :) )
Alan
moblid
02-28-2018, 04:05 PM
Great, thanks so much! the update fell into spam which is why I didn't respond earlier. both yours and Jindon's work.
Moshe
DocAElstein
02-28-2018, 04:13 PM
Hi Mosche
You are welcome!
Thanks for the feedback !
:)
Alan
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.