+ Reply to Thread
Results 1 to 8 of 8

Renumber rows with the inclusion of blank

  1. #1
    Registered User
    Join Date
    07-31-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Question Renumber rows with the inclusion of blank

    Hello, everyone. This may be a silly question. I have a data in excel 2010.
    Column A Column B
    Position Value
    1 200
    5 10
    18 20
    ..........

    How can I renumber positions by inlcuding blanks like:
    Column A Column B
    Position Value
    1 200
    2 0
    3 0
    4 0
    5 10
    .........

    Thanks

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Renumber rows with the inclusion of blank

    You are asking for Excel to create the 'missing' position values and then put a 0 in the column next to it. An automated way would require VBA, since Excel will not create data for you. The 'easier' way is for you to create the list of integers 1 to 18 (or whatever your max Position value is) in column C. Then in D1 use:
    =IFERROR(INDEX($B$1:$B$18,MATCH(C1,$A$1:$A$18,0)),0)
    and drag down the column
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Registered User
    Join Date
    07-31-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Renumber rows with the inclusion of blank

    Could you please provide a little bit detailed steps. I have little experience. Thanks

  4. #4
    Registered User
    Join Date
    07-31-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Renumber rows with the inclusion of blank

    Pauley: It works very well. Thanks.

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Renumber rows with the inclusion of blank

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.95 for Mac MS 365
    Posts
    8,684

    Re: Renumber rows with the inclusion of blank

    I hope this isn't against the rules (posting on a solved thread), I was following this post and after reading Pauley's solution, I wondered if you already created the list as you note
    create the list of integers 1 to 18 (or whatever your max Position value is) in column C
    wouldn't a find and replace work as well and maybe a little more quickly? I tried it using find (left blank) and replace 0 and it worked for me and was pretty easy and quick.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  7. #7
    Registered User
    Join Date
    07-31-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Renumber rows with the inclusion of blank

    Yes. For short list, find/replace works fast. However, Pauley's vba is only choice for long list, for instance, >10000 in my data.

  8. #8
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.95 for Mac MS 365
    Posts
    8,684

    Re: Renumber rows with the inclusion of blank

    would think it would work for a long list too but don't want to try it to see.
    Cool.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Checking for inclusion in a new list
    By amartino44 in forum Excel General
    Replies: 1
    Last Post: 05-17-2013, 01:08 PM
  2. [SOLVED] How to renumber large excel file with blank spaces between
    By DUNNCRAIG in forum Excel General
    Replies: 5
    Last Post: 05-15-2012, 05:18 PM
  3. [SOLVED] renumber numbers?
    By nickdclements in forum Excel General
    Replies: 5
    Last Post: 11-10-2010, 08:22 PM
  4. renumber worksheets
    By qwertyjjj in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-18-2007, 05:47 AM
  5. [SOLVED] Renumber a WorkSheet
    By Mirco Wilhelm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-02-2006, 01:20 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1