+ Reply to Thread
Results 1 to 16 of 16

Conditional formatting based on list of numbers - select number 4000

  1. #1
    Registered User
    Join Date
    06-13-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    70

    Conditional formatting based on list of numbers - select number 4000

    Hi Guru's

    I have list of numbers 1000,2000, 3000, 4000, 5000, 6000 and 7000 in A2 List box. I have made conditional formatting if cell is blank highlist with no color.
    Now If it is 4000 ... It has to highlight with color certain cells of the row. We can fill the data in them.

    Please advise formula. I appreciate your help and co-operation.

    Regards
    uday

  2. #2
    Registered User
    Join Date
    06-04-2014
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    72

    Re: Conditional formatting based on list of numbers - select number 4000

    In lieu of a sample workbook, you can create conditional formatting for each of the values that look like this:

    "=AND(A2 = 1000)"

    Then just select the desired color. Repeat with all necessary values and apply to the respective range.

    The above assumes each value gets a unique color. If that is not necessary, then the following will work:

    "=OR(A2=1000, A2=2000, A2=3000, A2=4000, A2=5000, A2=6000, A2=7000)"
    Last edited by McStagger; 03-15-2017 at 11:32 AM.

  3. #3
    Registered User
    Join Date
    06-13-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    70

    Re: Conditional formatting based on list of numbers - select number 4000

    Hi McStagger,

    Thank you for the reply. I appreciate it. I am looking for, if I select A2 - 4000 then it should highlight with color for C2, F2, I2, J2 cells. So that other users fills the data in CE, F2,I2, J2 instead of filling data in wrongs cells.

    Regards
    Uday

  4. #4
    Registered User
    Join Date
    06-04-2014
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    72

    Re: Conditional formatting based on list of numbers - select number 4000

    To do that you would still use the above formulas in a CF, you will just need to specify the cells in which the CF is applied. If you post a sample workbook, it may be easier to assist; this is also the preferred method of working with questions set by the forum moderators so dont be surprised if one jumps in and mentions this directly.

  5. #5
    Registered User
    Join Date
    06-13-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    70

    Re: Conditional formatting based on list of numbers - select number 4000

    I am sorry it is typo mistake not CF , it is C2 Cell. - Uday

  6. #6
    Registered User
    Join Date
    06-04-2014
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    72

    Re: Conditional formatting based on list of numbers - select number 4000

    CF = Conditional Formatting

  7. #7
    Registered User
    Join Date
    06-13-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    70

    Re: Conditional formatting based on list of numbers - select number 4000

    Hi

    I am attaching the excel sheet
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    06-04-2014
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    72

    Re: Conditional formatting based on list of numbers - select number 4000

    Your Excel sheet isn't working as it is dependent upon another sheet that is not included.

    That said, you mentioned that if 4000 is selected that cells C2, F2, I2, J2 will highlight. What happens if a different number is selected, will different cells highlight?

  9. #9
    Registered User
    Join Date
    06-13-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    70

    Re: Conditional formatting based on list of numbers - select number 4000

    Hi McStagger,

    I apologize for the delay in response, I am assigning this to user to fill the data which is required for 4000 only but not other cells. User knows that what fields he is going to fill it up.

    Regards
    Uday

  10. #10
    Registered User
    Join Date
    06-04-2014
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    72

    Re: Conditional formatting based on list of numbers - select number 4000

    Look at the attached and inspect the cells where highlighting has taken place to see the layout of the CF settings.

    EDIT: Corrected the CF
    Attached Files Attached Files
    Last edited by McStagger; 03-16-2017 at 09:54 AM.

  11. #11
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Conditional formatting based on list of numbers - select number 4000

    Just for information, the AND is unnecessary and you could make the formatting work across multiple rows- for the respective cell in column A- using
    =$A2=4000
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  12. #12
    Registered User
    Join Date
    06-04-2014
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    72

    Re: Conditional formatting based on list of numbers - select number 4000

    Fair point, xlnitwit. The $A2 was an oversight, I tend to lock everything down on an initial setup just to make sure things are working.

    As far as "AND" is concerned, it's a habit. I tend to use "SUM" in a similar way.

  13. #13
    Registered User
    Join Date
    06-13-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    70

    Re: Conditional formatting based on list of numbers - select number 4000

    Hi

    I am not able to understand, would you please let me know step by step.

    Regards
    Uday

  14. #14
    Registered User
    Join Date
    06-04-2014
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    72

    Re: Conditional formatting based on list of numbers - select number 4000

    To recreate the sheet I wrote, do the following:
    1. In cell A2, enter your test value 4000
    2. Under the 'Conditional Formatting' button, click 'New Rule' Note: Cell A2 should still be selected, but not necessary.
    3. A new window titled 'New Formatting Rule' should have popped up. In this window click on 'Use a formula to determine...', it is at the bottom of the list.
    4. In the formula box, enter your formula. In this case I used "=AND($A2=4000)"
    5. Now click on the 'Format' button and select how you want to relevant cells to be displayed.
    6. Click Ok, you should now be back to the main sheet but you will notice that nothing has happened except for A2 being highlighted.
    7. Click on 'Conditional Formatting' -> 'Manage Rules'
    8. A new box title 'Conditional Formatting Rules Manager' should have popped up. Next to 'Show formatting rules for:' is a drop down list, select 'This Worksheet'
    9. You should now see your conditional formatting. In the column 'Applies to' enter the cells you want this rule applied to (C2, F2, I2, J2). Click Apply.
    10. If something funky happened and not all the cells lit up as expected, it is likely because Excel adjusted the initial A2 assignment. Simply click on 'Edit Rule' and remind Excel that the lookup cell is $A2. Note: The "$" is important to include otherwise the formatting will not work.

    Does that help?

  15. #15
    Registered User
    Join Date
    06-13-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    70

    Re: Conditional formatting based on list of numbers - select number 4000

    Hi McStagger - It doesn't work. - Uday

  16. #16
    Registered User
    Join Date
    06-04-2014
    Location
    USA
    MS-Off Ver
    Office 2016
    Posts
    72

    Re: Conditional formatting based on list of numbers - select number 4000

    Can you please upload your attempt so I can take a look at where things may have gone wrong?

+ 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. Select and colour cell depending on rank of number (macro conditional formatting)
    By mrpwebb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-14-2014, 03:59 PM
  2. [SOLVED] Conditional formatting - formatting the lowest 2 numbers in a list of 12 numbers
    By ktbb0312 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-09-2013, 09:59 AM
  3. [SOLVED] Conditional Formatting of List based on selections from Dropdown list
    By FoxyPinkChick in forum Excel General
    Replies: 4
    Last Post: 05-31-2013, 03:32 AM
  4. [SOLVED] Conditional formatting color 3 numbers in another list
    By Berna11 in forum Excel General
    Replies: 5
    Last Post: 03-08-2013, 12:19 PM
  5. Select Region Based on Conditional Formatting
    By yunesm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-07-2010, 06:05 PM
  6. select and modify numbers based on formatting
    By wchem in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-26-2009, 08:57 AM
  7. Select specific numbers from a list based on position
    By judoist in forum Excel General
    Replies: 1
    Last Post: 11-21-2005, 12:25 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