PDA

View Full Version : [SOLVED:] Change listview items font color based on criteria



djemy1975
03-03-2016, 03:48 AM
Dear friends,

I have an e-mailing form to accomplish and I want to do some conditional formatting based on criteria in column "G"

I want to turn rows (listitems & subitems in listview) font color into "red" if column G contains "Non Payée" and into Green if column G contains "Payée"

Is that possible?

Herewith my file

Thanks in advance,

skywriter
03-03-2016, 09:35 AM
If you select all the rows and columns you want to format, by starting at the top most row and left most column and finishing the selection at the bottom most row and right most column, then do the following.

Go to conditional formatting and choose create a new rule and then choose to use a formula to determine which cells to format, then enter the following formula for non payee, based on your sample workbook.

=$G2="Non Payee" and choose the red font and then create another rule for payee following the same procedure and using the same $G2 reference but changing the text.

djemy1975
03-03-2016, 03:05 PM
Thank you sir ,

But what I want to do is changing font color in the listview itself.Is it possible?

THANKS IN ADVANCE

Charlize
03-04-2016, 08:32 AM
Yes, it's possible to achieve this. But I presume you would like each row to be on different line in the listview.
Now they are shown after each other.
I believe I wrote a kb article about colourview items in listview object.
Search for my name in kb.
Maybe later got some time to look at this.
Charlize

djemy1975
03-04-2016, 12:39 PM
Sorry I searched but found nothing .could you give me the exact title.

thanks,

Charlize
03-06-2016, 12:51 PM
np, attached you find the file. Good Luck.
Charlize

djemy1975
03-06-2016, 02:34 PM
Thank you very much as it is exactly what I am looking for

djemy1975
03-07-2016, 07:08 AM
Dear charlize,

Sometimes working sometimes giving "type mismatch error 13".What do you think is the reason?


Could you help me adapt it to the form I have

Herewith my file...