+ Reply to Thread
Results 1 to 10 of 10

Conditional formatting

  1. #1
    Registered User
    Join Date
    02-27-2014
    Location
    Köln, Germany
    MS-Off Ver
    Excel 2010
    Posts
    8

    Conditional formatting

    Hello to all,

    I want to Format a text containing cell in dependence of another cell that contains an integer number.

    Example:

    If the number the cell is 1, the indent of the text cell should be 0.
    If the number the cell is 2, the indent of the text cell should be 1.
    And so on..

    How can I get to a solution?

    Thanks in advance for a quick help.

    Regards

    Andreas

  2. #2
    Valued Forum Contributor
    Join Date
    12-25-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    506

    Re: Conditional formatting

    Hi Andreas, could you put up a small sample workbook, with expected result and description of how you get it?


    _______________________________________________________________________________________________________________________________
    1. Click on the * Add Reputation if you think someone helped you
    2. Mark your thread as SOLVED when question is resolved

    Alvin

  3. #3
    Registered User
    Join Date
    02-27-2014
    Location
    Köln, Germany
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Conditional formatting

    Hello Alvin,

    here is a screenshot of my Problem:

    EXCEL-Problem.jpg

    In dependence of the assembly level in column 1, the description should be indented. I managed that by using single columns for each level. But I want to indent the description in dependence of the assembly Level only in 1 column.

    Is that possible?

    Regards

    Andreas
    _____

    ASZ

  4. #4
    Valued Forum Contributor
    Join Date
    12-25-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    506

    Re: Conditional formatting

    Quote Originally Posted by as02011961 View Post
    I managed that by using single columns for each level. But I want to indent the description in dependence of the assembly Level only in 1 column.
    Hi Andreas, I'm afraid I couldn't get what you mean by the quote above..


    _______________________________________________________________________________________________________________________________
    1. Click on the * Add Reputation if you think someone helped you
    2. Mark your thread as SOLVED when question is resolved

    Alvin

  5. #5
    Registered User
    Join Date
    02-27-2014
    Location
    Köln, Germany
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Conditional formatting

    Quote Originally Posted by alvin-chung View Post
    Hi Andreas, I'm afraid I couldn't get what you mean by the quote above..


    _______________________________________________________________________________________________________________________________
    1. Click on the * Add Reputation if you think someone helped you
    2. Mark your thread as SOLVED when question is resolved

    Alvin
    Well, Alvin,

    let me explain. As You see on the attached screenshot, I have a BOM with 10 Levels. For a better overview of the structure I use a single column for each Level to put the description text into. Those 10 columns I want to replace by 1. But the optical effect should be similar to the one with 10 columns, i.e. the decription text in the single column should be indented according to the assembly level in the column before that.

    Got it?

    Regards

    Andreas

  6. #6
    Valued Forum Contributor
    Join Date
    12-25-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    506

    Re: Conditional formatting

    Hi Andreas,

    One alternative that I could think of is to create a helper column with formula for the indent.

    Example:
    Column A: number of indent
    Column B: original description without indent
    Column E: this is a helper column with formula E2=REPT(A2," ") & B2 --- assume that each indent is 4 spaces, change as you wish


    _______________________________________________________________________________________________________________________________
    1. Click on the * Add Reputation if you think someone helped you
    2. Mark your thread as SOLVED when question is resolved

    Alvin

  7. #7
    Registered User
    Join Date
    02-27-2014
    Location
    Köln, Germany
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Conditional formatting

    Hello Alvin,

    thank You for answering. I will try Your solution. It Looks good for me.

    Regards

    Andreas

  8. #8
    Registered User
    Join Date
    02-27-2014
    Location
    Köln, Germany
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Conditional formatting

    Hello Alvin,

    I tried Your proposal, but it didn't work! I get an error message when entering the formula =REPT(A2, " ") & B2.

    Regards

    Andreas

  9. #9
    Registered User
    Join Date
    02-27-2014
    Location
    Köln, Germany
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Conditional formatting

    Sorry Alvin,

    here I am again. It works! I am using a German Version of EXCEL, the function REPT is here WIWDERHOLEN.

    Sorry.

    Regards

    Andreas

  10. #10
    Valued Forum Contributor
    Join Date
    12-25-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    506

    Re: Conditional formatting

    No worries, glad it helps.


    _______________________________________________________________________________________________________________________________
    1. Click on the * Add Reputation if you think someone helped you
    2. Mark your thread as SOLVED when question is resolved

    Alvin

+ 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. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  2. Delete Conditional Formatting conditions but keep cell formatting - Excel 2010
    By tetreama in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-09-2012, 08:28 PM
  3. Replies: 3
    Last Post: 05-15-2012, 04:13 PM
  4. Replies: 1
    Last Post: 03-05-2012, 06:20 PM
  5. Replies: 2
    Last Post: 11-02-2007, 12:03 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