+ Reply to Thread
Results 1 to 4 of 4

Ading data and make excel add a number and stick with it

  1. #1
    Registered User
    Join Date
    11-23-2006
    Posts
    12

    Ading data and make excel add a number and stick with it

    Hello.

    Tried to see if someone had asked this before but dindīt see it.

    I have lets say 30 cells. in row A I have numbers from 1-30 and in row B I have names sorted a-z. my question is if I add a name in row B how can I tell Excel to put in row A the next number say 31 and stick with that name when I sort the B row later (A-Z)??

    Thank you for your time.

    Regards,
    Hemmiv

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi,

    One way would be to have some VBA code in the Worksheet_SelectionChange event. This could react to a new name entry in column B which was one row below the last entry, and which would calculate the next highest number and pop it into the cell in the same row on column A. e.g.

    Please Login or Register  to view this content.
    Rgds

  3. #3
    Registered User
    Join Date
    11-23-2006
    Posts
    12
    Hi.

    Thanks for this that helped, but now when I move my cursor upp or down over the names it changes the numbers in the rate of the cursor moving upp or down over the names (hope you understand this)

    Regards,
    Hemmiv

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi,

    Yes, I see the problem, it must have been getting late last night!
    Try the following

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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