+ Reply to Thread
Results 1 to 3 of 3

Multiple formatting in one column

  1. #1
    Registered User
    Join Date
    03-05-2012
    Location
    Yorkshire
    MS-Off Ver
    Excel 2016
    Posts
    79

    Multiple formatting in one column

    Hi all,
    I have a supplier's price list for car parts. The car part maker has part numbers in various formats e.g 3 397 020 358 or 021 or H380. My supplier strips out all the spaces where they exsist to make 3397020358 I need to format the file so that they have the spaces if they are supposed to have them, if the part number begins with a zero that the spaces and the zero are in place and if if it's a short number like 021 that's intact and H380 etc also stay as they are. I know how to keep 3397020358 in to 3 397 020 358 by using custom formula # ### ### ### but am getting very confused with others. They part numbers are all in a single column. Could anyone help please. Thanks as always.

    Kind regards
    Jason

  2. #2
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Multiple formatting in one column

    VBA is always the best solution to these type of matters.... But I recognize that we don't all want to do this... So Nested formulas would be my next suggestion.

    Lets modify what you have stated.

    First rule you imply is your false... meaning... if something else is not present leave as is...
    If the part number begins with a zero that the spaces and the zero are in place and if if it's a short number like 021 that's intact and H380 etc also stay as they are
    If these are your 3 Scenarios than this is your simple solution...

    Please Login or Register  to view this content.
    What this says is... IF the CELL starts with 0 or the Cell starts with a CHAR and not a NUM then just return the CELL otherwise custom formula (Formatting the CELL)

    CELL - Should be your first cell that you find this in
    CUSTOM FORMULA - Should be the formula you stated you already can do
    Which I am assuming would be something like
    Please Login or Register  to view this content.
    I think that will do it if I read the question correctly...
    Really that text formula should treat non numeric numbers as a string and not try to format it...though a short number would become a string of 0's ending with the value...

    so your 043 would turn into 0 000 000 043... but with the IF statement leading it will prevent that from happening... but if you are good with this...than just go with only the text formula


    Cheers
    Last edited by ELeGault; 09-02-2016 at 06:21 AM. Reason: Defining Formula
    -If you think you are done, Start over - ELeGault

  3. #3
    Registered User
    Join Date
    03-05-2012
    Location
    Yorkshire
    MS-Off Ver
    Excel 2016
    Posts
    79

    Re: Multiple formatting in one column

    Thanks ELeGault,
    I will give that a go this afternoon and let you know how I get on.

    Kind regards

+ 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. [SOLVED] Can I add multiple tests and value checks in Column formatting
    By Robbie8 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-15-2016, 04:18 PM
  2. [SOLVED] conditional formatting based on other cell (over multiple Rows & Column)
    By pipsmultan in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-08-2015, 03:50 AM
  3. Replies: 2
    Last Post: 07-31-2014, 01:31 PM
  4. [SOLVED] Conditional Formatting multiple column based on reference cell???
    By inincubus in forum Excel General
    Replies: 2
    Last Post: 01-23-2014, 04:04 PM
  5. Multiple Column Conditional Formatting
    By TylerJamison in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-26-2012, 05:10 PM
  6. Replies: 3
    Last Post: 01-26-2010, 08:36 PM
  7. [SOLVED] Multiple Column Conditional Formatting
    By Colleen in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 09-09-2005, 05:05 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