+ Reply to Thread
Results 1 to 6 of 6

custom format

  1. #1
    Registered User
    Join Date
    09-03-2008
    Location
    england
    Posts
    1

    Unhappy custom format

    i want to format a cell to display a UK national insurance number in the following format, I enter WG256759C IN CELL A:1 and want it to display like this: WG 25 67 59 C

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    Hi Gazd, welcome to the forum.

    Please take a moment to read the forum rules, paying close attention to #5 (posting in the correct sub-forum). I've moved your post this time, but future posts not adhering to the forum rules may be locked or deleted.

    Thanks!

  3. #3
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848
    Unlike numbers, text cannot be reformatted in the manner you wish.

    You can, however use code to change the formatting.
    Right click on the tab you want to formatting to change and then choose View Code.
    Paste the following - change the C:C in the Intersect(Range("C:C"),Target) section to the column you want to change.
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-20-2008
    Location
    Saudi Arabia
    Posts
    21
    Mdbct,

    what do you mean by "right click on the tap" ? what tap ?

    I tired to creat a command bottom and put the code in it but it didn't work.

    I appreciate your help

  5. #5
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Quote Originally Posted by gazd View Post
    i want to format a cell to display a UK national insurance number in the following format, I enter WG256759C IN CELL A:1 and want it to display like this: WG 25 67 59 C
    Try this in B1 copied down

    =LEFT(A1,2)&" "&MID(A1,3,2)&" "&MID(A1,5,2)&" "&MID(A1,7,2)&" "&RIGHT(A1,1)
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  6. #6
    Forum Contributor
    Join Date
    08-22-2008
    Location
    S-o-t
    MS-Off Ver
    Office 2000 & 2010
    Posts
    166
    Mdcbct means right click on the Sheet tab I.e Sheet1 View code and paste the code above and it will do what you want it to.

+ 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. custom cell format needed
    By cosmicgrooves in forum Excel General
    Replies: 5
    Last Post: 01-26-2008, 06:17 PM
  2. Custom Date Format
    By windme in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-06-2007, 10:21 AM
  3. Custom Format question....
    By ddd in forum Excel General
    Replies: 2
    Last Post: 07-22-2007, 06:25 PM
  4. Custom format number and date together
    By blueMoon in forum Excel General
    Replies: 2
    Last Post: 01-30-2007, 08:25 PM
  5. Custom format & Alignment
    By MattShoreson in forum Excel General
    Replies: 3
    Last Post: 11-02-2006, 08:25 AM

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