+ Reply to Thread
Results 1 to 9 of 9

Conditional Formatting based on cell / range id / location

  1. #1
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Conditional Formatting based on cell / range id / location

    Hi
    Say I want cell a1 highlighted regardless if I insert / delete colums / rows (column a and row 1 included).
    Thanks

    edit: and regardless what is in it.
    Last edited by drgkt; 12-17-2015 at 12:56 AM.

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Conditional Formatting based on cell / range id / location

    Select the entire sheet and use below formula in conditional format

    =AND(ROW(A1)=1,COLUMN(A1)=1)
    Please Login or Register  to view this content.
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Conditional Formatting based on cell / range id / location

    Thanks!

    What about a range?

    Say K17:N18

  4. #4
    Forum Contributor
    Join Date
    02-07-2013
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    290

    Re: Conditional Formatting based on cell / range id / location

    Quote Originally Posted by drgkt View Post
    Thanks!

    What about a range?

    Say K17:N18
    Hi,

    I think you can use this CF formula:

    =AND(OR(ROW()=17,ROW()=18),OR(COLUMN()=11,COLUMN()=12))

    Column number:
    11=K
    12=N

    Adjust accordingly (columns / rows)

    Blessing

  5. #5
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    604

    Re: Conditional Formatting based on cell / range id / location

    Khalidngo, is close but 11 and 12 are columns K & L.
    For K-N this will work =AND(OR(ROW()=17,ROW()=18),AND(COLUMN()>10,COLUMN()<15))

  6. #6
    Forum Contributor
    Join Date
    02-07-2013
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    290

    Re: Conditional Formatting based on cell / range id / location

    Quote Originally Posted by Beamernsw View Post
    Khalidngo, is close but 11 and 12 are columns K & L.
    For K-N this will work =AND(OR(ROW()=17,ROW()=18),AND(COLUMN()>10,COLUMN()<15))
    Ah, sorry my mistake.

    Thanks for correction.

  7. #7
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Conditional Formatting based on cell / range id / location

    Suppose on the above conditional formatting we give a cell color yellow.

    If a cell within the range is moved to location outside the range, then the cell within the range becomes white (because it has lost the CF formula) and the target cell outside the range becomes yellow even though it carries the CF formula.

    Any way to preserve the range cell color even in the above scenario?

  8. #8
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Conditional Formatting based on cell / range id / location

    No ideas anyone?

  9. #9
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Conditional Formatting based on cell / range id / location


+ 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. [SOLVED] Formatting based on highest value in range AND location of said value
    By excelnotsogenius in forum Excel General
    Replies: 4
    Last Post: 12-09-2015, 11:11 AM
  2. [SOLVED] Use Conditional Formatting on a Cell Based on matching a value in a range
    By fablhof in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-25-2015, 09:28 PM
  3. Conditional formatting a cell based on occurence in a range.
    By truxhavenx in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-24-2015, 05:29 PM
  4. Replies: 3
    Last Post: 08-13-2013, 09:44 AM
  5. Conditional Formatting via VBA: Change formatting in range based on value of each cell
    By ralphjmedia in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-12-2013, 10:37 AM
  6. Conditional Formatting - Grey Out and Lock A range based on a cell value in that range
    By Excelgnome in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2012, 07:31 PM
  7. Replies: 3
    Last Post: 06-05-2010, 10:28 AM

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