+ Reply to Thread
Results 1 to 22 of 22

Conditional formatting help please - See last post. new issue. thank you.

  1. #1
    Registered User
    Join Date
    11-16-2014
    Location
    Mt Isa
    MS-Off Ver
    2016
    Posts
    62

    Conditional formatting help please - See last post. new issue. thank you.

    Hi Guys and Gals,
    Looking for some help in setting up a document for work. I have currently made the SS sum "/" count cells to stop the display from simplifying the fraction, because it needs to be a direct count not a percentage/simplified fraction for work reason. This unfortunately throws up a new issue when i link this information to another page for easy reading of different members of the team. What i would really like to do is somehow format these linked cells to look for:

    If x < y in x / y, then go red, if x = y in x / y, then go green.

    Any ideas on how i get excel to do this when the cell is formatted in the other sheet to stay as text not a fraction?

    Thanks for you help.
    Last edited by MrMac80; 02-20-2017 at 12:53 AM.

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional formatting help please

    A1 = x
    B1 = y

    select where is your A1/B1 (x/y)
    in CF:
    1st rule: =A1<B1 (red)
    2nd rule: =A1=B1 (green)

  3. #3
    Registered User
    Join Date
    11-16-2014
    Location
    Mt Isa
    MS-Off Ver
    2016
    Posts
    62

    Re: Conditional formatting help please

    Hi Sandy,

    I need a bit more information. I can get the CF to work in the sheet that has the original information by using the formulas 2 parts, i.e. SUM(C15:E15)&"/"&COUNT(C15:E15) and changing the &"/"& to < or =. However this doesn't work on the sheet with the linked cell. The CF also does not translate across Is there a way of getting this to happen? Apply CF rules to a linked cell?

    Its a doozy, hence why i am here.

    Thanks for the first step though.

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional formatting help please

    Attach a sample workbook. (Not a picture!)
    Make sure there is just enough data to demonstrate your need. Include a BEFORE (original) sheet and an AFTER (required output) sheet in the workbook if needed to show the process you're trying to complete or automate.
    Make sure your desired results are shown, mock them up manually if necessary. Remember, it should reflect original structure of your data.
    Remember to desensitize the data.
    Note:
    • Please do not attach password protected workbooks/worksheets
    • Please do not attach file(s) from exterior servers
    • Please do not attach file(s) with enabled any Workbook Open/Autorun macros!

    20 rows of data is enough (probably)

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If link is not from FORUM server you have to wait until someone will want to watch the file from an external server.

  5. #5
    Registered User
    Join Date
    11-16-2014
    Location
    Mt Isa
    MS-Off Ver
    2016
    Posts
    62

    Re: Conditional formatting help please

    Thanks for the advice. I will upload/attach a very brief copy as described. I have called it class and teacher, just for this example. I have put the red and green colour onto the cells in 1 example on the linked page.

    I have also include small comments for these 2 cells to hopefully explain things better.

    Again thank you for looking and trying to help.

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional formatting help please

    One question: only 0/0 = no color?

  7. #7
    Registered User
    Join Date
    11-16-2014
    Location
    Mt Isa
    MS-Off Ver
    2016
    Posts
    62

    Re: Conditional formatting help please

    Hi Sandy,

    Yes only 0/0. The members of the sheet are being instructed to enter data on the date of capture, whether that be 1 for return or 0 for no return.

    Hope that answers your question.

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional formatting help please

    Select range
    for green: =AND(--LEFT(C5,1)<>0,--RIGHT(C5,1)<>0,--LEFT(C5,1)=--RIGHT(C5,1))
    for red: =AND(--LEFT(C5,1)<>0,--RIGHT(C5,1)<>0,--LEFT(C5,1)<--RIGHT(C5,1))
    Last edited by sandy666; 02-14-2017 at 09:25 PM. Reason: file added

  9. #9
    Registered User
    Join Date
    11-16-2014
    Location
    Mt Isa
    MS-Off Ver
    2016
    Posts
    62

    Re: Conditional formatting help please

    Thank you Sandy that is awesome.

    Only issue i have come across is when 1 of the numbers is "0" it stays white. ie 0/1 stays white not red. I fixed this by removing the --left = 0 part of the line of info. Can you see that causing any issues. I cant.

    Again thank you for such a quick solution. You are a legend.

  10. #10
    Registered User
    Join Date
    11-16-2014
    Location
    Mt Isa
    MS-Off Ver
    2016
    Posts
    62

    Re: Conditional formatting help please

    Not sure if i should ask another question in a new thread or just ask here. So i will try here first.

    Can you embed a formula/function into cells that stays there even if a cell has data entered into it?

    For example. I have set up a cell to check the date, and reproduce an "overdue" statement if Today's date is past (referencing a due date cell). If someone then comes along and enters that this piece has been submitted by accident, it will delete the cells formulas. Is there a way that someone can enter a set response (i have defined this using data validation) but then delete this text and have the cell return to its previous formula/function?

  11. #11
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional formatting help please

    ad.1.
    Green: =AND(--LEFT(U18,1)<>0,--RIGHT(U18,1)<>0,--LEFT(U18,1)=--RIGHT(U18,1))
    Red: =OR(--LEFT(U18,1)<>0,--RIGHT(U18,1)<>0,--LEFT(U18,1)<--RIGHT(U18,1))
    but all greens should always be above the red in CF (ie. green, red or green, green, green, red, red, red)

    cf.jpg

    ad.2.
    If you have any formula in the cell and type there anything you will erase formula.
    Formula cannot delete any other formula.
    Formula cannot delete any value
    About DataValidation: could you attach small example? (with step-by-step what you want to achieve)
    but probably VBA will be solution. (not me )


    ==
    If the basic problem is solved
    - it's always a good practice to show respect to the person(s) who have helped you
    - is a click on the Add Reputation first (left lower corner of the post of person(s) who helped you) and then
    - mark the thread as SOLVED (top right corner over your first post - Thread Tools). This is important for all of us,

    Thanks
    Last edited by sandy666; 02-15-2017 at 09:01 AM. Reason: pic added

  12. #12
    Registered User
    Join Date
    11-16-2014
    Location
    Mt Isa
    MS-Off Ver
    2016
    Posts
    62

    Re: Conditional formatting help please

    Thank you Sandy.
    The Data validation works fine, it just has a drop down box with allowable responses for those boxes. I have included the automatically generate responses as options so staff can manual re-enter mistakes. Was just wondering if there was a way. I will try the VBA path.

    Again you have been more than helpful, you are a real asset to this forum.

  13. #13
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional formatting help please

    Glad to help and thanks for the feedback

  14. #14
    Registered User
    Join Date
    11-16-2014
    Location
    Mt Isa
    MS-Off Ver
    2016
    Posts
    62

    Re: Conditional formatting help please

    Hey Sandy,
    Small issue has arise. Wondering if you or someone else can help please.
    Uploaded a mock ss, hope this helps?
    0/0 to stay white
    0/ any number greater than 0 = red. e.g. 0/1, 0/20. etc
    any number greater than 0 but less than the other part of the fraction / any number greater than 0 = orange, e.g. 1/2, 1/10, 5/15.
    Both sides of the / sign =, turn green. 1/1, 20/20.

    The only other way i can think of making the SS do what i want it to do is for the cell to search another sheets cells for the word refer. IF any cell has refer = red. IF no cell has refer, but does have overdue turn orange. IF no cell has refer or overdue, but has "1" for submitted, turn green. This was seems very complicated and well above my head.

    Sandy so i can learn please. When you put --LEFT etc that obviously tests the left side of the "/" but why use C5,1 or U18,1? Changing these numbers or letters changes what certain cells do in my doc. Not sure why. Thanks again for your help.
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    11-16-2014
    Location
    Mt Isa
    MS-Off Ver
    2016
    Posts
    62

    Re: Conditional formatting help please

    Have managed to get most things working, only issue is with green working when there is more than 1 place value in either side of the "/".

    Green - =AND(--LEFT(B5,1)<>0,--LEFT(B5,1)=--RIGHT(B5,1))
    Orange - =AND(--LEFT(B5,1)<>--RIGHT(B5,1),--LEFT(B5,1)<--RIGHT(B5,11)) * notice the use of "11" instead of "1" needed for double digit cells.
    Red - =AND(--LEFT(B5,1)=0,--RIGHT(B5,1)<>0)

  16. #16
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Conditional formatting help please - See last post. new issue. thank you.

    See attachment........
    Attached Files Attached Files
    Quang PT

  17. #17
    Registered User
    Join Date
    11-16-2014
    Location
    Mt Isa
    MS-Off Ver
    2016
    Posts
    62

    Re: Conditional formatting help please - See last post. new issue. thank you.

    Hi Bebo, thanks for the help. It is well above me what you have done, but it still has the fundamental issue. I can get it to work for either single digit fractions OR double digit fractions, but not both.

    Your formatting now works for double digit fractions, but all single digit fractions like 5/5 stay white. I cant work it out either

  18. #18
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Conditional formatting help please - See last post. new issue. thank you.

    Sorry for my mistake, for the second CF, try to put "--" before LEFT and RIGHT to convert it into value

    =--LEFT(SUBSTITUTE(C5,"/"," "),2)=--RIGHT(SUBSTITUTE(C5,"/"," "),2)

  19. #19
    Registered User
    Join Date
    11-16-2014
    Location
    Mt Isa
    MS-Off Ver
    2016
    Posts
    62

    Re: Conditional formatting help please - See last post. new issue. thank you.

    Thank you, that did the trick. Can you please explain something to me. What part of the code allows for a choice between 1 and 2 digit numbers?

  20. #20
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional formatting help please - See last post. new issue. thank you.

    @bebo
    what about 0/0 ? should be/stay uncolored. I did double unary like you said and got 0/0 blue

    @MrMac

    try:

    green:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    orange:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    red:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    white (option):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    btw for empty cells: brown: =C5=""
    Attached Files Attached Files
    Last edited by sandy666; 02-20-2017 at 07:17 AM. Reason: add xlsx

  21. #21
    Registered User
    Join Date
    11-16-2014
    Location
    Mt Isa
    MS-Off Ver
    2016
    Posts
    62

    Re: Conditional formatting help please - See last post. new issue. thank you.

    Thank you both for your input. between the both of you i have managed to get a working document up and running.

    Few more things to iron out, but the conditional formatting seems to be working again.

    This forum is awesome, thanks to people like you guys.

  22. #22
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional formatting help please - See last post. new issue. thank you.

    You are welcome

    Mark thread solved if problem is resolved.

+ 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. Replies: 1
    Last Post: 12-08-2016, 03:14 PM
  2. Replies: 2
    Last Post: 10-03-2016, 08:35 AM
  3. Conditional Formatting Removing Previous Conditional Formatting?
    By CravingGod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2016, 01:02 PM
  4. Replies: 6
    Last Post: 01-08-2016, 06:44 PM
  5. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  6. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  7. Replies: 3
    Last Post: 05-15-2012, 04:13 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