+ Reply to Thread
Results 1 to 3 of 3

Formatting Cells

  1. #1
    Registered User
    Join Date
    05-20-2015
    Location
    United Kingdom
    MS-Off Ver
    2003
    Posts
    34

    Question Formatting Cells

    Hi,

    Earlier today someone helped me with the macro I am using for my spreadsheet, but I've come across a small problem that I can't seem to solve.

    The macro is assigned to a button and once pressed it adds numbers in a sequence to the sheet. But I can't seem to get the number (which is suppose to be a purchase order number.) in the correct format I use at work.

    I've attached a sample spreadsheet and, in the sheet called 'log' you will notice that in the 'P/O NO' column the numbers follow a sequence, BA07691, BA07692, etc.. but in cell B16 it jumps to BA17690. I would like it to carry on following the sequence, so when it reaches BA07699 the next number would be BA07700 and so on. Would really appreciate some help on this, I'd imagine it is something fairly straight forward?

    The format I am using is: "BA"-07690

    Although I have tried other variations.

    Gus
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,858

    Re: Formatting Cells

    You are trying to do arithmetic by using a custom format and that just isn't going to work. Since you're already using a macro, you should modify the macro to generate the P/O numbers just how you need them. Use this code, which I tested in your file:

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    05-20-2015
    Location
    United Kingdom
    MS-Off Ver
    2003
    Posts
    34

    Re: Formatting Cells

    I'm fairly new to macros, don't really know too much about them. But I appreciate your help, the code works just as I wanted.

    Thank you.

    Gus

+ 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. Conditional Formatting - Color Formatting for Blank Cells
    By mlbdc2012 in forum Excel General
    Replies: 10
    Last Post: 02-10-2015, 06:28 AM
  2. Formatting Cells with Date or Text Values in a Conditional Formatting Formula
    By Phil Hageman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-15-2014, 09:36 AM
  3. Conditional Formatting. No formatting for Blank Cells
    By missellyt in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-11-2014, 06:42 AM
  4. Replies: 2
    Last Post: 09-19-2013, 10:34 AM
  5. Replies: 5
    Last Post: 05-18-2013, 07:49 PM
  6. Replies: 4
    Last Post: 01-06-2012, 05:07 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