+ Reply to Thread
Results 1 to 42 of 42

Conditional formatting based on range of cells in different sheet

  1. #1
    Registered User
    Join Date
    09-05-2012
    Location
    България
    MS-Off Ver
    Excel 2003
    Posts
    18

    Conditional formatting based on range of cells in different sheet

    Hi,

    I'm trying to make the conditional formatting based on as follows:

    cell in sheet 3 is getting red if anywhere in sheets 1 and 2 could be find the number 6.1.1

    Thank you so much!!!
    Last edited by iveta96; 05-31-2015 at 04:17 AM.

  2. #2
    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
    28,147

    Re: Conditional formatting based on range of cells in different sheet

    Please post a small sample file showing what you expect.

  3. #3
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Conditional formatting based on range of cells in different sheet

    Two problems.
    1) If you want to put conditional formatting on the sheet "2" and uses the formula all cells that sheet, will be faced with circular reference.
    2) If You use all the cells of a sheet may be faced with the error Excel does not have enough resources for ...
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Conditional formatting based on range of cells in different sheet

    Two problems.
    1) If you want to put conditional formatting on the sheet "2" and uses the formula all cells that sheet, will be faced with circular reference.
    2) If You use all the cells of a sheet may be faced with the error Excel does not have enough resources for ...
    If you do not use sheet "2" formula can be
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-05-2012
    Location
    България
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Conditional formatting based on range of cells in different sheet

    Thank you for the fast answer.
    I can use sheet 3 for the formula with cell range in sheets 1 and 2. I don't need the entire range. I need it from A1:J200. The formula you wrote give me an error. Could you please help me to make it with sheets 1 and 2 and the range I mentioned.

  6. #6
    Registered User
    Join Date
    09-05-2012
    Location
    България
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Conditional formatting based on range of cells in different sheet

    I have seats which I sell to concrete people. There will be a list with concrete people names on sheets 1 and 2. When the seat is occupied we put the number of a seat on a row of a person name. In sheet 3 there will be a scheme with all seats. So I expected when I look on sheet 3 to have green "free" sectors and red "occupied" sectors, so I can quickly managed free and occupied. The range I will use on sheets 1 and 2 is from A1:J200.
    Thank you. I hope you can help me.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Conditional formatting based on range of cells in different sheet

    I think that it would be helpful if you did as you were asked, back at post#2, and post an Excel sheet. I suspect that htis isn't too hard - but seeing what's on sheet 2 would be a great help; and seeing how your data are laid out in 1 & 3 would be very useful.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  8. #8
    Registered User
    Join Date
    09-05-2012
    Location
    България
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Conditional formatting based on range of cells in different sheet

    Hi Glenn,

    I made a draft of what it will be.
    Here you are.Seats.xlsx

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Conditional formatting based on range of cells in different sheet

    This is NOT easy. In your number: 6.3.1 which bits are the seat number and which the sector?

  10. #10
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Conditional formatting based on range of cells in different sheet

    In your example the formula is
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The condicional formating is applied to SCHEME!B3E32.
    I attached your changed file
    Attached Files Attached Files

  11. #11
    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
    28,147

    Re: Conditional formatting based on range of cells in different sheet

    I don't think you can use COUNTIF as it fills in a range rather than individual cells (seats). I believe (not being an expert) that you need to MATCH each individual cell (seat).

    The following (simplistic) rules appear to work but something more generic would be better as it requires applying these to each column:

    =MATCH($C$2&A3,OWNERS!$F$2:$F$30,0) for cells C3:c30 on SCHEME
    =MATCH($C$2&A3,HOTELl!$C$2:$C$30,0) for cells C3:C30

    I tried an OR with the above but did nor work (for me!)


    Happy to be proved wrong!

  12. #12
    Registered User
    Join Date
    09-05-2012
    Location
    България
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Conditional formatting based on range of cells in different sheet

    You are right, countif fills range of cells. I need individual. I tried Jose Augusto wrote, but it fills range of cells. I hope there is a decision. The number 1.1.1 is block 1, sector 1, seat 1.

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Conditional formatting based on range of cells in different sheet

    Can you redraft your seat plan showing SECTOR, BLOCK and SEAT separately?

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Conditional formatting based on range of cells in different sheet

    This is probably still wrong, as I'm not clear what's a block and what's a sector... but. Take a look at this.

    There is one FUNDAMENTAL flaw that, I think, I can address later. There is NOTHING to stop double booking of the same seat. But, let's get the formatting right first.
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    09-05-2012
    Location
    България
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Conditional formatting based on range of cells in different sheet

    I can make it easier - only with block and seat number. I redrafted. Seats.xlsx

  16. #16
    Registered User
    Join Date
    09-05-2012
    Location
    България
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Conditional formatting based on range of cells in different sheet

    Quote Originally Posted by Glenn Kennedy View Post
    This is probably still wrong, as I'm not clear what's a block and what's a sector... but. Take a look at this.

    There is one FUNDAMENTAL flaw that, I think, I can address later. There is NOTHING to stop double booking of the same seat. But, let's get the formatting right first.
    When I allow "enable editing" and your fomulas are gone. I make it only with blocks and seat numbers. The block number is first, the second is seat number. It will be great if we could avoid double booking. Thank you for the efforts!

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Conditional formatting based on range of cells in different sheet

    OK. It's clear. Check this out carefully and see if it's doing what you want.

    then we can address double-booking issues.

    Enter the booking as normal, don't touch the pale green cells. Just check that the cell reference in the relevant row (N.B. I MEAN sheet reference NOT table reference) has turned red.
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 05-31-2015 at 07:12 AM.

  18. #18
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Conditional formatting based on range of cells in different sheet

    I don't understand what you mean by:

    "When I allow "enable editing" and your fomulas are gone. I make it only with blocks and seat numbers. "

    If this is still an issue with the latest version, please explain again!!

  19. #19
    Registered User
    Join Date
    09-05-2012
    Location
    България
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Conditional formatting based on range of cells in different sheet

    Quote Originally Posted by Glenn Kennedy View Post
    OK. It's clear. Check this out carefully and see if it's doing what you want.

    then we can address double-booking issues.

    Enter the booking as normal, don't touch the pale green cells. Just check that the cell reference in the relevant row (N.B. I MEAN sheet reference NOT table reference) has turned red.
    YES!!! This is exactly what I need!!! When we address double booking issues, is it possible for you to wait for me about 2-3 days to make the real file and to put the right formulas in it, so I can be sure it's working properly? Unfortunately, what you did it's too hard for me and I not sure I can transfer it... Thank you again.

  20. #20
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Conditional formatting based on range of cells in different sheet

    The same happens to me. Why?

  21. #21
    Registered User
    Join Date
    09-05-2012
    Location
    България
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Conditional formatting based on range of cells in different sheet

    Quote Originally Posted by Glenn Kennedy View Post
    I don't understand what you mean by:

    "When I allow "enable editing" and your fomulas are gone. I make it only with blocks and seat numbers. "

    If this is still an issue with the latest version, please explain again!!
    The new file you send me is OK!

  22. #22
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Conditional formatting based on range of cells in different sheet

    Jose - what problem have you found?

    Iveta - no problem. However, I'm off to Krakow on Wednesday for a few days and don't know what my www access will be like (I'm certainly NOT turning roaming on; so it depends on wifi availability in the place I'm staying).

  23. #23
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Conditional formatting based on range of cells in different sheet

    Last file is good for me.
    Thanks

  24. #24
    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
    28,147

    Re: Conditional formatting based on range of cells in different sheet

    Attached in sample solution based on Glenn's approach: I take no credit for the solution.
    Attached Files Attached Files

  25. #25
    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
    28,147

    Re: Conditional formatting based on range of cells in different sheet

    Apologies to Glenn who had already posted the solution: I guess we crossed in the post. For my part I learnt a lot from Glenn's posting ... so thank you.

  26. #26
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Conditional formatting based on range of cells in different sheet

    Hi again. I thought that I'd deal with the double-booking bit now; while it's fresh in my mind. In your final version, the green cells can be hidden and I may use the Availability result as Data Validation to prevent entry of a double booking. We'll wait and see how you get on with adapting it to your real sheet.
    Attached Files Attached Files

  27. #27
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Conditional formatting based on range of cells in different sheet

    John, what was the problem with my first version? I know it's OK now, but I'd like to know what had been wrong with it!!

  28. #28
    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
    28,147

    Re: Conditional formatting based on range of cells in different sheet

    Glenn,

    There was nothing wrong with your first version - it was just what was required. I was simply changing the Address calculation to reflect the new formatting . The solution was all yours so again my apologies if I inadvertently implied your solution was wrong.

    John

  29. #29
    Registered User
    Join Date
    09-05-2012
    Location
    България
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Conditional formatting based on range of cells in different sheet

    Quote Originally Posted by Glenn Kennedy View Post
    Hi again. I thought that I'd deal with the double-booking bit now; while it's fresh in my mind. In your final version, the green cells can be hidden and I may use the Availability result as Data Validation to prevent entry of a double booking. We'll wait and see how you get on with adapting it to your real sheet.
    Glenn, I will be ready with the file after 6-7 hours. I would like to discuss with you another issue. I was decided when I am ready with the file, to copy the data in google sheets. This I want to make, because thru wi-fi connection and google drive, I will be able to update online, even without need of closing the file. I'd tried this previous days. So 5 people could work simultaneously on the area. The problem is that when I tried to transfer your file in google sheets, it says that conditional formatting could not work in multiple sheets. Do you have an idea how could I solve this problem.

  30. #30
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Conditional formatting based on range of cells in different sheet

    I don't use google sheets; so I don't know what restrictions there are on CF. Why not stick to Excel? What's so special bout Google sheets?

  31. #31
    Registered User
    Join Date
    09-05-2012
    Location
    България
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Conditional formatting based on range of cells in different sheet

    Quote Originally Posted by Glenn Kennedy View Post
    I don't use google sheets; so I don't know what restrictions there are on CF. Why not stick to Excel? What's so special bout Google sheets?
    What does it mean stick to excel? There is nothing special about google sheets. I need no matter which cloud service, so we can use this file in cloud space and to update it at each moment. This is a very big area with seats (beach with 700 sunbeds) and all day we need to know which one is occupied or free.

  32. #32
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Conditional formatting based on range of cells in different sheet

    Why not just continue to use Excel?

  33. #33
    Registered User
    Join Date
    09-05-2012
    Location
    България
    MS-Off Ver
    Excel 2003
    Posts
    18
    Quote Originally Posted by Glenn Kennedy View Post
    Why not just continue to use Excel?
    Because if I have 3 people with 3 tablets using this file, I need them to use the file together and each one to see the changes that others make. And I can't think up for other way to achieve this, except cloud. When I use cloud, opening the file for editing and sync on laptop or mobile goes thru kind of application and saving and syncing it's hard. But I will try to find a decision. I am already so grateful with your help for the file.
    Last edited by iveta96; 05-31-2015 at 11:04 AM.

  34. #34
    Registered User
    Join Date
    09-05-2012
    Location
    България
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Conditional formatting based on range of cells in different sheet

    Hi Glenn,

    this will be the final version of a file. I leave your sheets just in case (first three). I use your version before file avoiding double booking. Looking forward.

    Seats GK 2.xlsx[ATTACH]
    Last edited by iveta96; 05-31-2015 at 04:30 PM.

  35. #35
    Valued Forum Contributor
    Join Date
    05-20-2013
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2013
    Posts
    941

    Re: Conditional formatting based on range of cells in different sheet

    See if you like this method (uses pictures and sheet macro)...

    iveta96.xlsm

    Your profile says 2003 but your posting .xlsx files?

    Don't know how Google Sheets handles macros... but I don't think it does since its VBA.

    Do other file users have access to OneDrive's online Excel? (I don't know if online Excel does VBA either)

    PS: I'm no VBA expert, I just cobbled the code together... perhaps a VBA guru can refine it.
    Last edited by jhren; 05-31-2015 at 07:05 PM.

  36. #36
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Conditional formatting based on range of cells in different sheet

    See how this works... I have hidden the column with the formulas on each of the three sheets.
    Attached Files Attached Files

  37. #37
    Registered User
    Join Date
    09-05-2012
    Location
    България
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Conditional formatting based on range of cells in different sheet

    Quote Originally Posted by Glenn Kennedy View Post
    See how this works... I have hidden the column with the formulas on each of the three sheets.
    Glenn, thank you so much!!! It's absollutely great!!! I am so grateful for your efforts.

  38. #38
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Conditional formatting based on range of cells in different sheet

    Glad to have helped! If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. It'd also be appreciated if you were to click the add Reputation button at the foot of any of the posts of those who helped you reach a solution.

  39. #39
    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
    28,147

    Re: Conditional formatting based on range of cells in different sheet

    I believe the booking logic assumes entries in "OW OASIS I" is in row sequence: an entry in row 20 is accepted but if I now put the same entry in row 15 then row 15 is designated as "OK" and row 20 as "Already Booked" when in reality it is the reverse.

    Should the COUNTIF no check the whole column as it does for the other sheets?

    Am I correct in my assumption about entry sequence?

  40. #40
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Conditional formatting based on range of cells in different sheet

    Well spotted! Back in a minute...

  41. #41
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Conditional formatting based on range of cells in different sheet

    Amended... Thanks John. Reputation added for that!!
    Attached Files Attached Files

  42. #42
    Valued Forum Contributor
    Join Date
    05-20-2013
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2013
    Posts
    941

    Re: Conditional formatting based on range of cells in different sheet

    FWIW, here's a screen snip of my SCHEME sheet..

    Seating.gif

+ 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. Conditional formatting for a range of cells based on data from two cells
    By Tindomerel in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-25-2014, 05:09 AM
  2. Conditional Formatting - Colouring % of mulitple cells based on date range
    By yeahyeah93 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-13-2014, 09:22 AM
  3. Replies: 3
    Last Post: 08-13-2013, 09:44 AM
  4. 3+ Conditional Formatting Rules for cell range based on Formula from other cells
    By osborsm9 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-06-2013, 08:48 PM
  5. [SOLVED] Conditional formatting based on dates in a range of cells
    By pmerobertson in forum Excel General
    Replies: 8
    Last Post: 01-10-2013, 12:50 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