Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Conditional Formatting-Icon Sets using 0 to 3 numbers

0

I have attached a excel file which shows 0 to 3 numbers with different colors as ICon Setting.

Here what I want is once i change the number like 0 it should give green color Icon set, and If I use 1 then the color has to change to Gray, and If I change to 2 it should change to Yellow and if I change the number to 3 it has to give red color. 

For reference you can see the file and I need the solution for it.

Thank you in advance.

Regards,

Ajazuddin

Answer
Discuss

Discussion

Hi Ajazuddin and welcome to the Forum.

Not sure what your question is here.. do you want to use 6 icons (one each for numbers 0 to 5) and what type of icon? Please edit your original question to clarify

It might help if you attached a file...   Please edit your question and use the Add Files... button to upload a representative Excel file (without any personal data) to show your existing data. Then we should be able to give specific help.
John_Ru (rep: 6092) May 18, '22 at 2:55 am
Hello John_Ru thank you for your reply and i will be sending you the file as to understand my question for better solution.
ajazuddin (rep: 4) May 18, '22 at 5:12 pm
Sorry but something went wrong- your file was NOT uploaded. Please try again, remembering it must be an Excel file
John_Ru (rep: 6092) May 18, '22 at 5:27 pm
Hello John_Ru
I just added the file you can look for it.

Thank you
Regards,
Ajazuddin
ajazuddin (rep: 4) May 18, '22 at 5:36 pm
Thanks Ajazuddin- I'll try tomorrow (it's late here)
John_Ru (rep: 6092) May 18, '22 at 5:50 pm
Appreciated John
Thank you once again.
ajazuddin (rep: 4) May 19, '22 at 5:16 am
Add to Discussion

Answers

0
Selected Answer

Ajazuddin

Not sure if this is what your want but the attached file has conditional formatting for cell G9 (right of yellow filled cell F9).

As you change the value, the dot in the cell will change colour. The colours don't match what you show in D8:D11 but are something like. You could just show the icon (by checking an option in the conditional formatting dialog).

I did that applying conditonal formatting to G9 as follows. Right click cell, pick Conditional formatting... then:

  1. change Icon Style: to pick the one with four icons, say the spots- grey, red, yellow and green )
  2. change the Type (on right) so each reads Number
  3. set values from top to (>=)  3, 2,1 and 0
  4. pick an icon for your colours (use Down arrow by Icon and select).

If you really want to swap icon sets (rather than icons), you'll probably need to use VBA (and I'd rather go for inserting a shape in the cells rather than swap icon sets).

Hope this helps.

Discuss

Discussion

Dear John_Ru,
Greetings!

Thank you for your solution but I am unable to access the file you attached.
ajazuddin.md@gmail.com you can send me the file here.
Thank you.
Regards,
Ajazuddin
ajazuddin (rep: 4) May 19, '22 at 10:56 pm
Ajazuddin   I'd rarher not use email so please try agan...

If you use Google Chrome say (on a PC), log in to TeachExcel, go to the Answer and click on the file (below the Answer). The flie icon abd name should appear on the left in the bar at bottom of the browser windowr and pick Open or View in browser (the file will be in the Downloads folder anyway, typically something like C:\Users\Ajazuddin\Downloads).

If my Answer does not suit your purposes, please note that you can deselect it and clarify your question.
John_Ru (rep: 6092) May 20, '22 at 2:14 am
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login