+ Reply to Thread
Results 1 to 6 of 6

Format Data based on an IF STATEMENT on how many empty spaces in a cell

  1. #1
    Registered User
    Join Date
    01-02-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    48

    Format Data based on an IF STATEMENT on how many empty spaces in a cell

    Hi

    Struggling here to find a solution maybe someone here can lend there expertise.

    I have data file and i need to sort them into columns. All the data to sort is in column A with certain blank spaces before the value in the cell that determines its type and want to copy to another column.

    This is what I have currently that i m trying to building on. This is just a synopsis.

    My question is how to get the if statement to work to figure out the blank space before each cell text.

    Sample:

    Type (3 spaces)
    Seller (5 spaces)
    Manufaturer (7 spaces)
    Product (9 spaces)
    Detail (11 spaces)
    Description (13 spaces)
    Product (9 spaces)
    Detail (11 spaces)
    Description (13 spaces)


    Please Login or Register  to view this content.

    Hope this detail makes sense and someone can help.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Format Data based on an IF STATEMENT on how many empty spaces in a cell

    Try something like:

    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Format Data based on an IF STATEMENT on how many empty spaces in a cell

    Not quite sure what you are trying to achieve. You want to sort the data and placed into another column ?

  4. #4
    Registered User
    Join Date
    01-02-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Format Data based on an IF STATEMENT on how many empty spaces in a cell

    OllyXLS great piece of code, working now with minor modification to suit my file see below for anyone with the same problem.

    THANKS!!

    Please Login or Register  to view this content.

  5. #5
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Format Data based on an IF STATEMENT on how many empty spaces in a cell

    Glad you think it's solved

    Looking at what you're trying to do, perhaps it can simplify even further, to:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    01-02-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    48

    Re: Format Data based on an IF STATEMENT on how many empty spaces in a cell

    Thanks this is great.

+ 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] If statement based on cell format (currency)
    By concatch in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-12-2013, 04:57 AM
  2. remove empty spaces in data
    By kisboros in forum Excel General
    Replies: 8
    Last Post: 02-13-2013, 12:06 AM
  3. Replies: 1
    Last Post: 01-30-2013, 01:08 PM
  4. Delete empty spaces in cell
    By sakinen in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-20-2009, 04:47 AM
  5. If statement Don't Show Data if cell is empty
    By PacE in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-04-2008, 04:57 PM

Tags for this Thread

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