+ Reply to Thread
Results 1 to 5 of 5

Number edit in column

  1. #1
    Registered User
    Join Date
    09-18-2006
    Posts
    3

    Number edit in column

    Several questions. Lets say I have a column designated for order numbers. Its in the format of XXXXX-YY.

    Example:

    Row 1 40200-14
    Row 2 40201-01
    Row 3 40202-08
    Row 4 40203-55

    Notice how the number before the dash increments by one.

    So my questions are:

    1. Is there a way I can have Excel automatically increment the number before the dash every time someone enters a new row?
    Example: If I enter 40209-10 then next row I enter would autofill 40210.

    2. Is there an edit I can put in that will only allow numbers that are higher than the previous number entered?
    Example: If I enter 40298 on the last line, what can I do to ensure I don't accidentally enter a lower number such as 40198? (I actually did that today).

    Any information would be appreciated. Thanks.

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Probably easiest, short of VB code, is to set conditional Format to show Red if A2<=A1

    hth

    Quote Originally Posted by BryanM67
    Several questions. Lets say I have a column designated for order numbers. Its in the format of XXXXX-YY.

    Example:

    Row 1 40200-14
    Row 2 40201-01
    Row 3 40202-08
    Row 4 40203-55

    Notice how the number before the dash increments by one.

    So my questions are:

    1. Is there a way I can have Excel automatically increment the number before the dash every time someone enters a new row?
    Example: If I enter 40209-10 then next row I enter would autofill 40210.

    2. Is there an edit I can put in that will only allow numbers that are higher than the previous number entered?
    Example: If I enter 40298 on the last line, what can I do to ensure I don't accidentally enter a lower number such as 40198? (I actually did that today).

    Any information would be appreciated. Thanks.

  3. #3
    Forum Contributor kraljb's Avatar
    Join Date
    05-26-2004
    Location
    Illinois
    MS-Off Ver
    2007 (recent change)
    Posts
    256
    Using Data Validation you can do it, I'm assume that you are selecting cell A2:A1000 and the active cell is cell A2. Select Custom from the Validation Allow Menu. In the formula put

    =AND((LEFT(A2,5)*1)>(LEFT(A1,5)*1),LEN(A2)=8)

    Make sure not to have $ in the formula, then it will give an error if you try to enter the first 5 digits below the previous entry, and forces the 8 digits of the XXXXX-YY format.

    Hope that helps,
    John

  4. #4
    Registered User
    Join Date
    09-20-2006
    Posts
    4

    moving address numbers to seperate column

    This is my first time using this web site so please bear with me.
    I have an address spreadsheet. What I would like to be able to do is sort by street name.
    Questions:
    1) is there a way to select the number of the street and put it in its own column so I can sort by street name?
    2) is there a way without taking out the street number and sorting by street name only?
    ex;
    3138 MESCALERO DR DHLS
    3126 MESCALERO DR DHLS
    3117 ARTHUR DR DHLS
    3119 E ARTHUR DR DHLS
    3121 ARTHUR DHLS
    3125 E ARTHUR DR DHLS

  5. #5
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by mdunstan
    This is my first time using this web site so please bear with me.
    I have an address spreadsheet. What I would like to be able to do is sort by street name.
    Questions:
    1) is there a way to select the number of the street and put it in its own column so I can sort by street name?
    2) is there a way without taking out the street number and sorting by street name only?
    ex;
    3138 MESCALERO DR DHLS
    3126 MESCALERO DR DHLS
    3117 ARTHUR DR DHLS
    3119 E ARTHUR DR DHLS
    3121 ARTHUR DHLS
    3125 E ARTHUR DR DHLS
    In a separate column put the street name as

    =IF(ISERROR(VALUE(LEFT(A1,FIND(" ",A1)))),A1,MID(A1,FIND(" ",A1)+1,999))

    and sort over street name then over column A.

    note, If you have street numbers of the form 4/4444 etc, use

    =IF(ISERROR(VALUE(LEFT(A1,1))),A1,MID(A1,FIND(" ",A1)+1,999))

    ---

    ---
    Last edited by Bryan Hessey; 09-21-2006 at 07:02 PM.

+ 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