+ Reply to Thread
Results 1 to 6 of 6

Colour the first cell in a row/range cell where a value exceeds $x

  1. #1
    Forum Contributor
    Join Date
    05-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Colour the first cell in a row/range cell where a value exceeds $x

    Hi,

    I have a range of cells (A1:A12) each with monthly sales figures.

    I need to highlight where in the range the values exceed a certain amount ($50k for example). However it's only the first cell that hits the value that should be coloured, i.e. once it reaches the figure nothing afterwards is to be coloured. So it could occur in cell A3 nothing afterward should be coloured.

    I've tried using conditional formatting but I can't get the cell to determine if any other cell is coloured.

    Any ideas would be appreciated and I've attached a sample file.

    Thanks

    David
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Colour the first cell in a row/range cell where a value exceeds $x

    =AND(SUM($A$2:B2)>=$O2,SUM($A$2:A2)<$O2) as the conditional formatting for cell B2 (then copy, paste special, formats to other columns), with the threshold for that row is in column O (you could replace the $O2 with 50000, but the formula allows for dragging down with different thresholds per row). You may need to adjust it if the threshold is reached in Jan.

  3. #3
    Forum Contributor
    Join Date
    05-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: Colour the first cell in a row/range cell where a value exceeds $x

    Hi Gak267,

    Thanks for getting back to me.

    I've tried the formula (=AND(SUM($A$2:B2)>=$O2,SUM($A$2:A2)<$O2)) in B2 with the value of $2000 in O2, but the formatting doesn't show.

    Could you attached a sample file for me to have a look at?

    Thanks

    David

  4. #4
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Colour the first cell in a row/range cell where a value exceeds $x

    Coloured as Exceeds $X (1).xlsx
    As requested. A2 has a different conditional formatting equation.

  5. #5
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Colour the first cell in a row/range cell where a value exceeds $x

    Quote Originally Posted by DaveBre View Post
    I've tried the formula (=AND(SUM($A$2:B2)>=$O2,SUM($A$2:A2)<$O2)) in B2 with the value of $2000 in O2, but the formatting doesn't show
    As I said:
    You may need to adjust it if the threshold is reached in Jan
    I have done that in the file uploaded.

  6. #6
    Forum Contributor
    Join Date
    05-04-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: Colour the first cell in a row/range cell where a value exceeds $x

    Hi Gak67,

    That's for the posts, I've managed to get it working across my dataset.

    Many thanks

    David

+ 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. If range A = x/y/z colour adjacent cell
    By homer09001 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-09-2013, 10:43 AM
  2. If Cell value is highest in Range then make cell colour Red
    By beat in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-15-2012, 04:36 PM
  3. Count Filled colour in cell in given range
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-16-2006, 06:30 AM
  4. Changing cell colour in Range
    By viewmaster in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-06-2006, 06:23 PM
  5. Change cell colour for a cell or range within a predefined range
    By Martin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-23-2005, 02:06 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