+ Reply to Thread
Results 1 to 9 of 9

How to make column number in sequence even after deleting a record?

  1. #1
    Registered User
    Join Date
    04-01-2020
    Location
    london england
    MS-Off Ver
    office 365
    Posts
    7

    How to make column number in sequence even after deleting a record?

    Hello

    any help appreciated, i'm not an excel expert use a regular PC win 10 user with the Office 2016 suite.

    I know how to autofill a column with numbers in a sequence, ie.
    1
    2
    3
    4
    5
    Lets call this column 'Numbers'. And the next column is 'Books'. I use this to keep a book list. When I give a book away, I delete a row and it is a nuisance updating the numbers each time. They need to be sequential order to show me how many books remain. This is because a number in the 'Books' column is missing each time I delete a book.

    How can I autofill a column so that if I delete a row the numbers remain sequential? So for example, if I sell Book 3 and delete this row, I want the 'Number' column to change Book 4 to Book 3 automatically.

    I only need the 'Number' to automatically 'renew' itself if that makes sense.

    Thanks for any advice.

  2. #2
    Registered User
    Join Date
    07-02-2013
    Location
    Cheshire
    MS-Off Ver
    Office Professional 2007
    Posts
    79

    Re: How to make column number in sequence even after deleting a record?

    Hi Kaley. You could put this formula in the cells: =ROW()

    If your list of books starts in row 5 for example, make the formula =ROW()-4

    However, I'm not clear on why you would want to use the number in the cell. Instead, you could use one of the counting formulas at the top of your list to count how many rows are used. Also, just as another consideration, if you ever take a copy of the list, or want to use it for anything else, you may find that the number changing for a particular book may not be a good thing.

    Hope this helps.

    John

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: How to make column number in sequence even after deleting a record?

    You can use the ROW() function (subtract an offset if your data doesn't start in row 1)
    Rory

  4. #4
    Registered User
    Join Date
    04-01-2020
    Location
    london england
    MS-Off Ver
    office 365
    Posts
    7

    Re: How to make column number in sequence even after deleting a record?

    Hi Peter, thanks

    No the 'column' list is soley for knowing how many books I have. No other reason for keeping it.


    So I lose a book i delete it, and I if i get another book from somewhere, I will add it to the end of the list. The numbers themselves don't mean anything except that I know by looking at the last one, how many books I have.

  5. #5
    Registered User
    Join Date
    04-01-2020
    Location
    london england
    MS-Off Ver
    office 365
    Posts
    7

    Re: How to make column number in sequence even after deleting a record?

    Thanks Rorya,
    The list starts at the top from row 1. Basically, its just a method I use for knowing how many books I have. I add books at the end of the list, and delete a title when i get rid of it. Now when I delete a book, I click the row right at the start of the row in Excel, which highlights the whole row and I then delete the entire row.

    Its a very simple list and i'm sure there is a simple solution.

    Do I put =ROW() as a formula in all the boxes in a column? Or just in one? Sorry, but i'm a complete newbie on Excel.
    Last edited by kaley99; 08-06-2020 at 06:14 AM.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: How to make column number in sequence even after deleting a record?

    Why bother with it at all when you can just add a formula at the top of the list?

    Assuming that column A contains your book titles:

    =COUNTA(A:A)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Registered User
    Join Date
    04-01-2020
    Location
    london england
    MS-Off Ver
    office 365
    Posts
    7

    Re: How to make column number in sequence even after deleting a record?

    Thanks Ali,
    I just tried that and i got an error. I want the first column to have the numbers. Column B has the book titles.

    Where exactly do I put this forumla, and do i need to use the autofill and fill all the boxes in the column with it?

    Thanks for your help.

  8. #8
    Registered User
    Join Date
    04-01-2020
    Location
    london england
    MS-Off Ver
    office 365
    Posts
    7

    Re: How to make column number in sequence even after deleting a record?

    I've got it now, I understand how ROW() works.

    Thank you to all who replied and helped.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: How to make column number in sequence even after deleting a record?

    My point is that you don't need a column of numbers just to know how many books you have!!! You are making extra work for yourself.

    If the titles are in column B, this will count them:

    =COUNTA(B:B)

    Place it in ANY empty cell.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    Attached Files Attached Files
    Last edited by AliGW; 08-06-2020 at 07:10 AM.

+ 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. Need to make sequence number changes based on year purchased.
    By suffian5 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2020, 02:18 AM
  2. [SOLVED] How to count number of Xs in the last sequence Xs in a column
    By prudential in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-07-2018, 12:29 PM
  3. [SOLVED] Apply number sequence to rows in column if other column is not blank
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2016, 01:20 PM
  4. [SOLVED] VBA to count number in column and give number sequence in next column
    By saravanan1981 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-03-2016, 09:38 AM
  5. Replies: 7
    Last Post: 06-08-2015, 08:39 AM
  6. [SOLVED] Make record macro reference column name instead of letter?
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2013, 11:05 AM
  7. Force user to make entry into column T when leaving that record
    By Launchnet in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 01-15-2012, 11:00 PM

Tags for this Thread

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