Results 1 to 9 of 9

Thread: complete page numbers

  1. #1
    Junior Member
    Join Date
    Feb 2018
    Posts
    5
    Rep Power
    0

    complete page numbers

    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.

  2. #2
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,459
    Rep Power
    10
    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
    A Folk, A Forum, A Fuhrer ….

  3. #3
    Junior Member
    Join Date
    Feb 2018
    Posts
    5
    Rep Power
    0
    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

  4. #4
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,459
    Rep Power
    10
    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
    A Folk, A Forum, A Fuhrer ….

  5. #5
    Junior Member
    Join Date
    Feb 2018
    Posts
    5
    Rep Power
    0
    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-pro...d-numbers.html


    Quote Originally Posted by DocAElstein View Post
    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

  6. #6
    Junior Member
    Join Date
    Feb 2018
    Posts
    5
    Rep Power
    0
    ok, I received an answer in that forum. Thanks very much for your time and for making me clarify the question. Moshe

  7. #7
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,459
    Rep Power
    10

    fill out shortened numbers, complete page numbers elided to non elided numbers

    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/showth...0496#post10496




    The code will take something like this:_....
    Row\Col
    A
    B
    1
    34-5
    2
    3, 6-8, 24-56, 78, 123-45, 254-65
    3
    55-6, 122-6, 156-68
    4
    45, 255-8, 212-24
    5


    _.... and give you something like this:
    Row\Col
    A
    B
    1
    34-5 34-35
    2
    3, 6-8, 24-56, 78, 123-45, 254-65 3, 6-8, 24-56, 78, 123-145, 254-265
    3
    55-6, 122-6, 156-68 55-56, 122-126, 156-168
    4
    45, 255-8, 212-24 45, 255-258, 212-224
    5



    _.__________________________

    ( Now I will study the solution form jindon and see if I can understand it ! )

    Alan
    Last edited by DocAElstein; 02-16-2018 at 02:03 PM.
    A Folk, A Forum, A Fuhrer ….

  8. #8
    Junior Member
    Join Date
    Feb 2018
    Posts
    5
    Rep Power
    0
    Great, thanks so much! the update fell into spam which is why I didn't respond earlier. both yours and Jindon's work.
    Moshe

  9. #9
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,459
    Rep Power
    10
    Hi Mosche
    You are welcome!
    Thanks for the feedback !

    Alan
    A Folk, A Forum, A Fuhrer ….

Similar Threads

  1. Hide ProgressBar After Process Loop Is Complete
    By k0st4din in forum Excel Help
    Replies: 4
    Last Post: 04-24-2014, 12:29 AM
  2. VBA Macro To Print With Custom From And To Page Numbers
    By muhammad susanto in forum Excel Help
    Replies: 1
    Last Post: 12-23-2013, 03:11 PM
  3. Replies: 2
    Last Post: 07-18-2013, 03:34 AM
  4. Auto Complete for Data Validation
    By IJC in forum Excel Help
    Replies: 1
    Last Post: 05-15-2013, 09:30 AM
  5. Replies: 0
    Last Post: 03-06-2012, 03:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •