+ Reply to Thread
Results 1 to 10 of 10

Can Excel autoformatting choose the fill color automatically when I enter data in a cell?

  1. #1
    Registered User
    Join Date
    10-31-2011
    Location
    Alberta, Canada
    MS-Off Ver
    Excel 2003 (v11.0) and newer
    Posts
    10

    Question Can Excel autoformatting choose the fill color automatically when I enter data in a cell?

    I have a small sheet with a fair number of lines on it. When I enter a name in the first column, I would like that row to automatically fill the background color. If I entered a name that was already there, I would want to see the same color used as before. If the name has not been added to the column before, I would want a new color to be picked.

    Untitled 1.xls

    I know I can use conditional formatting, but entering a new format every time I entered a new name will get tedious quickly.

    Maybe I could use a formula to sum all the ascii values of the letters in a name and use that for the color number?

    Is this possible?
    Last edited by Calab; 09-01-2024 at 10:21 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,917

    Re: Can Excel autoformatting choose the fill color automatically when I enter data in a ce

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.

    Administrative Note:

    Is your forum profile showing the oldest Excel PRODUCT that you need this to work for?

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your product is for Mac, please also state this.

    The three most recent Excel products are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,917

    Re: Can Excel autoformatting choose the fill color automatically when I enter data in a ce

    This would need VBA - shall I move the thread for you?

  4. #4
    Registered User
    Join Date
    10-31-2011
    Location
    Alberta, Canada
    MS-Off Ver
    Excel 2003 (v11.0) and newer
    Posts
    10

    Re: Can Excel autoformatting choose the fill color automatically when I enter data in a ce

    Please do. Thank you.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,917

    Re: Can Excel autoformatting choose the fill color automatically when I enter data in a ce

    Thanks. Please address both issues in post #2 whilst I move the thread.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,252

    Re: Can Excel autoformatting choose the fill color automatically when I enter data in a ce

    AliGW: can I post a solution as version is not relevant with VBA?
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,917

    Re: Can Excel autoformatting choose the fill color automatically when I enter data in a ce

    The OP has updated their version - still using Excel 2003, it seems.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,252

    Re: Can Excel autoformatting choose the fill color automatically when I enter data in a ce

    Please Login or Register  to view this content.

    NOTE: without checking ALL previous used colours, there is no guarantee that a colour will not be repeated.
    Attached Files Attached Files
    Last edited by JohnTopley; 09-01-2024 at 11:26 AM.

  9. #9
    Registered User
    Join Date
    10-31-2011
    Location
    Alberta, Canada
    MS-Off Ver
    Excel 2003 (v11.0) and newer
    Posts
    10

    Re: Can Excel autoformatting choose the fill color automatically when I enter data in a ce

    Quote Originally Posted by AliGW View Post
    The OP has updated their version - still using Excel 2003, it seems.
    Yes... Some of my machines have newer software, but not this one.

  10. #10
    Forum Expert ByteMarks's Avatar
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    3,176

    Re: Can Excel autoformatting choose the fill color automatically when I enter data in a ce

    How many entries are there? If you choose dark colours you'll need to start changing the font colour too.

    Depending on the purpose, I was wondering if another approach could highlight other cells that are the same when you select one, or in another column add the number of the entry, e.g. Bob1, Bob2 etc.

+ 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. Automatically fill some data in a textbox when I choose an option from the combo box
    By aayush_1231 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 06-27-2019, 03:10 AM
  2. How to automatically sum based upon interior fill color when the fill color changes
    By Murman01 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-10-2017, 10:41 AM
  3. Automatically Fill in Formula as you enter data
    By leftrightleft in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-18-2014, 05:54 PM
  4. Replies: 3
    Last Post: 07-08-2010, 06:48 PM
  5. Can I custom choose my fill color?
    By excelmaster5000 in forum Excel General
    Replies: 3
    Last Post: 05-11-2008, 02:21 PM
  6. can excel automatically enter the date data in a cell was entered
    By mg_sv_r in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-09-2006, 06:30 AM
  7. Cell Fill Color:automatically
    By Scott Cadreau in forum Excel General
    Replies: 1
    Last Post: 12-22-2005, 01:30 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