+ Reply to Thread
Results 1 to 3 of 3

Macro to distinguish sequential numbers and report a value to a different cell

  1. #1
    Registered User
    Join Date
    06-04-2007
    MS-Off Ver
    Excel 2007
    Posts
    94

    Macro to distinguish sequential numbers and report a value to a different cell

    I have some item numbers (stored as text) that when the item has different variations of it the item number is sequential, but if it is unique meaning that it does not have variations the number unique. Rather than manually going through each of these items and labeling in another column whether it is an item or grouped I figured a macro would fix the problem.

    For example the item number typically is name-xxxxx-model, but the (xxxxx) can range from 3 to 5 numbers. So you would end up with something like the following:

    1. name-xxx00-model item
    2. name-xxx01-model grouped
    3. name-xxx02-model grouped
    4 name-xxx09-model item

    OR

    1. name-xx00-model item
    2. name-xx01-model grouped
    3. name-xx02-model grouped
    4 name-xx09-model item


    the items that are grouped may be more that just two. Additionally the numbers are being read as text.

    Any assistance with this would be greatly appreciated
    Attached Files Attached Files
    Last edited by capnhud; 10-10-2011 at 09:31 AM. Reason: reformatted example sheet.

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

    Re: Macro to distinguish sequential numbers and report a value to a different cell

    In the attached example, will it be possible to give the output you desire in a column? It will be easier to work out a solution for you.

  3. #3
    Registered User
    Join Date
    06-04-2007
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Macro to distinguish sequential numbers and report a value to a different cell

    yes having it in an additional column labeled attribute would be good. I changed the wrbk to simply things

    However if there is something in the cell ("item" "grouped") already then maybe that cell could be highlighted to indicate that something was there during the check.
    Last edited by capnhud; 10-10-2011 at 09:32 AM.

+ 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