+ Reply to Thread
Results 1 to 9 of 9

Auto-format a spreadsheet

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Auto-format a spreadsheet

    Hello,

    I'm looking to create a spreadsheet that auto formats as i enter data. For example, based on the values of cells in column "B", fill cells in column "A" a certain color and based on cell values in column C fill cells A to S a certain color. I have items in different rows and based upon what that item is i want certain parts of the row formatted a certain way. I also want this formatting to be active and automatic so that rows format as i enter data as well as format if i need to insert a row between two existing rows.

    What would be the best approach? Conditional formatting, macros, VBA?

    Thanks

  2. #2
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Auto-format a spreadsheet

    Conditional formatting is best for Text Color and Fill color. There are limits to what it can do but it's probably the best way to do. What where you looking to do? Please upload an example with you reply.
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,209

    Re: Auto-format a spreadsheet

    I'd suggest you set the data input sheet as a Table. Then formulae, formatting, conditional formatting and data validation will be automatically set up for each new row. You need Conditional Formatting to format cells based on the content of other cells.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Re: Auto-format a spreadsheet

    Thank you for your responses,

    I am using conditional formatting, so far so good.
    I have another issue, some rows i want to be automatically hidden based on values in one column. Is there a way to do this?

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,209

    Re: Auto-format a spreadsheet

    You can't use CF to hide a row or column, only to format calls, at least AFAIK.

    You would probably need a VBA Worksheet Change Event to monitor the column. However, if the column has formulae, you'd need to monitor the cells the formula depends on.

    Regards, TMS

  6. #6
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Re: Auto-format a spreadsheet

    I am almost done,

    I am at the point where i want to hide a row based on whether or not is says "HIDE" or "DONT HIDE" in the Z column(Z6:Z500)

    Suggestions?

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,209

    Re: Auto-format a spreadsheet

    Is the text typed in manually, selected from a Data Validation List, or the result of a formula?

    It would be helpful if you uploaded a sample workbook so that any potential solution can be checked.

    Regards, TMS

  8. #8
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Re: Auto-format a spreadsheet

    The text is the result of a formula.
    An IF statement that returns either HIDE or DONT HIDE.
    It is a spreadsheet for work, so i am unsure if i am able to upload. I have it working now using the filter tool under the data tab. Would VBA code work better?

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,209

    Re: Auto-format a spreadsheet

    Would VBA code work better?
    I wouldn't think so. Probably best not to introduce the complexity of VBA if you don't need it.

    I guess, with VBA, you could make the rows "vanish" as a result of the formula changing. But, obviously, that would require any user of the workbook to enable macros.

    Regards, TMS

+ 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. VBA in change event format to auto remove rows having zero value and auto sort
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-06-2013, 09:18 AM
  2. [SOLVED] Userform date entered in UK format but showing in US Format in spreadsheet
    By michelle 1 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-23-2013, 01:59 PM
  3. [SOLVED] Userform displays in (MM/DD/YYY) format, when spreadsheet stores as (DD/MM/YYYY) format
    By david1987 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-27-2012, 10:39 AM
  4. Auto Format spreadsheet with various rows month to month
    By sratkins in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2009, 01:07 AM
  5. Auto-Format Excel Spreadsheet?
    By Abe85 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-09-2006, 03:58 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