• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Conditional formatting question

Status
Not open for further replies.
Hi,
I have a spreadsheet that records people who borrow books, they are allowed to borrow 2 books/month and this is fine for using Duplicate values in conditional formatting. But, is it possible to set conditional formatting (or something else ) to highlight if somebody takes a third book? maybe a different colour or whatever?
Best Regards,
Noel
 

Noel Lackey

Could You send a clear sample Excel-file
with some sample data
with expected results.
After that,
I could try to do Your ( or something else ) with maybe a different colour or whatever.
 

Noel Lackey

I tried to do Your ( or something else ) with maybe a different colour or whatever.
Usage: add/delete numbers
 

Attachments

  • Noel_Lackey.xlsb
    17.3 KB · Views: 8

Noel Lackey

Usage: add/delete numbers ( #6 reply )
# Open that file
# Select cell D8 > write 4
# Select cell F8 > write 4
# Select cell H8 > write 4
# Select cell F8 > delete 4
...
 
For me, it works like below ...
#1 find cell D8 Screenshot 2024-01-24 at 13.31.25.png
#2 write 4 in cell D8Screenshot 2024-01-24 at 13.31.36.png

#3 write 4 in cell F8Screenshot 2024-01-24 at 13.31.51.png
#4 write 4 in cell H8Screenshot 2024-01-24 at 13.32.01.png

#5 delete 4 from cell F8Screenshot 2024-01-24 at 13.32.09.png

After You've written 4 in cell, You have to eg press <ENT> to confirm Your writing.
Those red corners are comments.
.. which information can see if You'll move Your mouse cursor over that cell.
 
For me, it works like below ...
#1 find cell D8 View attachment 86283
#2 write 4 in cell D8View attachment 86282

#3 write 4 in cell F8View attachment 86281
#4 write 4 in cell H8View attachment 86280

#5 delete 4 from cell F8View attachment 86279

After You've written 4 in cell, You have to eg press <ENT> to confirm Your writing.
Those red corners are comments.
.. which information can see if You'll move Your mouse cursor over that cell.
This is what I get in the real sheet there is data in D8 and F8 so I can't put 4 in them.
1706096643950.png
 
( Those D8 ... cells were only samples of cells. You could test with 'any cells' )

If it works with my file then do next steps:

# Open my sent file

With Your file:
# move mouse cursor over sheet-tab where do You would like to this work
# press right hand button gently
# You should see something like below
Screenshot 2024-01-24 at 13.29.27.png
# Select View Code

>> You should see needed code from my sent file
# Copy all those 15 lines

# Paste those to Your files needed sheet's (code)

# Close my file

# Save Your file with .xlsb (or .xlsm) - format
 
... hmm?
I've attached a sample file with #6 reply
Screenshot 2024-01-24 at 18.29.42.png
... and ...
You replied for that:
Hi,
yes that is a good solution how did you do it?
Thank you
Noel
 
yes, I have downloaded it and it is working to some extent, what is the significance of 4? and why do I have to put a 4 in F8 and delete it?
I have it working for the first highlighted number but if I add another line of 4's to the second number it seems to add the first and second together. I had to create a new column to put the answer otherwise it would overwrite the information already in the cell. I am looking for something that would alert me if the same customer number took a third book it is ok if they take 2
Thanks for all your help and patience
 
You asked in #11 reply
How do I test the file?
That test shows one kind of logic - how do this works.
# You can add in any cell any number.
# After that, my sample code checks all cells, especially cells which has numbers ...
... if that code noticed that there are more than one that cells value --- then it will give a comment
... if there are three same numbers, then in all of those cells has 3 in comment.
>>> if You delete one of those numbers ... then in all of those cells has 2 in comment ( that's why 'deletion' -test )

Now You wrote:
I am looking for something that would alert me if the same customer number took a third book it is ok if they take 2
... that could do other way, but then I have to know exact layout of Your used data.
= where is customer numbers? ... where are books?
You should able to create a sample Excel-file which shows some sample data ... which has some cases which gives alerts.
 
Status
Not open for further replies.
Back
Top