+ Reply to Thread
Results 1 to 5 of 5

Indent based On Cell Value

  1. #1
    Forum Contributor
    Join Date
    08-20-2013
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2010, 2016, 2019
    Posts
    110

    Indent based On Cell Value

    I want to set the IndentLevel for Column D by values in Column K. A value of 1 in Cell K indents Cell D by 1, A value of 2 in Cell K indents Cell D by 2 etc.

    I found the below, which is working, but only using Column B and A

    Please Login or Register  to view this content.
    How can I do this so that it is using the values of Column D and K?

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

    Re: Indent based On Cell Value

    Like so:

    Please Login or Register  to view this content.
    Last edited by 6StringJazzer; 10-01-2020 at 09:23 AM. Reason: changed 9 to 7 for offset

  3. #3
    Forum Contributor
    Join Date
    08-20-2013
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2010, 2016, 2019
    Posts
    110

    Re: Indent based On Cell Value

    Wonderfull, and thank you!

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Indent based On Cell Value

    Hi there,

    See if the following code does what you need:

    Please Login or Register  to view this content.
    The highlighted values may be altered to suit your requirements.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

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

    Re: Indent based On Cell Value

    You are welcome and thanks for the rep!

+ 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. Group WBS Rows Automatically Based on Indent Level (VBA)
    By rsfx in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-28-2024, 06:26 PM
  2. [SOLVED] Need to build a path based on text indent level
    By ozbrian in forum Excel General
    Replies: 7
    Last Post: 07-18-2020, 08:48 AM
  3. [SOLVED] Recursively Indent Cell Text based on Another Cell
    By dchanson in forum Excel General
    Replies: 3
    Last Post: 05-03-2019, 10:11 AM
  4. VBA to trim indent of a cell
    By Muktar888 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-09-2017, 12:13 PM
  5. if cell has indent, do x
    By ammartino44 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-24-2015, 02:17 PM
  6. Indent move cell, 2 indent move 2 cells etc
    By jomuir in forum Excel General
    Replies: 3
    Last Post: 05-14-2012, 11:56 AM
  7. Indent multiple Columns based on Value in One Column
    By BEEJAY in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2011, 01:42 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