Тёмный

Conditional Formatting using VBA Code - Change Cell Color basis on Condition 

Excel Destination
Подписаться 45 тыс.
Просмотров 67 тыс.
50% 1

Conditional Formatting in Excel VBA is very easy and powerful. You can use simple VBA Code with For Loop and If Condition on Worksheet Event to experience Conditional Formatting in Excel with VBA Macro.

Опубликовано:

 

16 мар 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 51   
@Shraddha2015
@Shraddha2015 2 месяца назад
Very helpful, thanks!
@craigbeuthin4299
@craigbeuthin4299 4 года назад
Great!!!! Thanks so much - very helpful
@sathishdsk37
@sathishdsk37 4 года назад
Thanks a lot sir, very very usefull.
@Troy-Echo
@Troy-Echo 2 года назад
Not quite what I was looking for, but handy.
@floresg4669
@floresg4669 4 года назад
Thank you very much!! Best video about this I've seen
@firasqatouni4605
@firasqatouni4605 4 года назад
This is great. It would be a bless if you could provide a VBA on how to change a cell interior based on a specific text in a cell, not cell value.
@luismolina8674
@luismolina8674 2 года назад
Did you ever find out how to do this in VBA?
@clamgoh
@clamgoh 5 лет назад
Thanks for the sharing
@sasavienne
@sasavienne 4 года назад
Thanks a lot..
@dehash666
@dehash666 4 года назад
Awesome. Now I know how to change cell color. Thank you. But how do I change color of not just one cell, but all cells to the right from it, lets say 20. If A1 has employee name and micro change color of A1 to red, how change all B1 to Z1. So I need entire row to change color, but only based of value on A1. Thank you.
@sankarsandash1318
@sankarsandash1318 2 года назад
Good learning
@ExcelDestination
@ExcelDestination 2 года назад
Thanks
@surajthakur5554
@surajthakur5554 5 лет назад
Good thing
@limibosi1785
@limibosi1785 3 года назад
I wanted to have the cell change colour every day. Fir example today blue, tomorrow green and next day different colour and so. Without having a date put in any column. Is this doable?
@godday2443
@godday2443 2 года назад
which code did you use to insert the cells accordingly, like the west, north etc
@jayecavallo8759
@jayecavallo8759 2 года назад
Hello, thank you for this video. I was able to easily implement. Would you be able to tell me how to implement this code based on two cells being true, meaning, if A1=Strawberry and B1= Blueberry, then range A1:B1 has a interior color of red? Much Appreciated
@genson332
@genson332 3 года назад
Hi is it possible if I selected a random range and apply the condition? I can only do the setted range but not the selected selection.
@ExcelDestination
@ExcelDestination 3 года назад
yes, that can be done.
@shivambhatia8425
@shivambhatia8425 3 года назад
I have one question, in the value where you mention specific value then can we select their range as well.
@ExcelDestination
@ExcelDestination 3 года назад
yes, we can.......
@empresscarrot5417
@empresscarrot5417 2 года назад
Do you have a macro code that will use the specific text inside a cell? That specific text will change everyday so I need something that will use what's inside the cell as a basis because it changes everyday.
@Bhavik_Khatri
@Bhavik_Khatri 3 года назад
Case statements can also be used.
@MKDono
@MKDono 4 года назад
Biggest problem in this approach that it is not efficient for large tables as the sub is re-evaluated for the entire table after any individual change is made, especially if you copy paste... Is there anyway the same results could be achieved without a global re-evaluation? only evaluate whatever is changed in the step
@ChadFi
@ChadFi 3 года назад
agree so much. this video is a waste of time.
@peterjames8046
@peterjames8046 3 года назад
is it possible to select a single text value and change the whole row colour. E.g. if East was the only word in the row and you want to highlight that whole row is that possible. May select from a drop down list and that will change the whole row colour. Like using conditional formatting formula
@ExcelDestination
@ExcelDestination 3 года назад
yes, it is possible
@peterjames8046
@peterjames8046 3 года назад
Would you be able to share how I could do this. I am currently stuck
@BeDreamerButterfly
@BeDreamerButterfly 4 года назад
Sir I'm getting this error Private sub worksheet_selectionchange(Byval Target As Range) is coming in yellow highlight After completing all code processes
@ExcelDestination
@ExcelDestination 4 года назад
without looking at entire code, I can not say what is the reason. I am hoping something is wrong with value or range.
@tayfoooooor
@tayfoooooor 3 года назад
Me too, I've got the same error :(
@tayfoooooor
@tayfoooooor 3 года назад
VBA compiler is Idiot, the problem is that i've a typo cause i wrote 'worksheet' withuot s :D
@rickyrichardson7132
@rickyrichardson7132 4 года назад
I want to change the color of a cell for creating a call contact log. Green for "Made contact", Yellow for "No answer" and Red for "Phone number is not good". How can I do this? And I enjoyed your video!!
@ticketingsupervisors3259
@ticketingsupervisors3259 3 года назад
Is their a way to also change the text color based on the cell color? So if East, it is blue box and white text? Thanks!
@ExcelDestination
@ExcelDestination 3 года назад
yes, you can use condition for font color also
@ticketingsupervisors3259
@ticketingsupervisors3259 3 года назад
@@ExcelDestination could you show me how that would look? I tried to add it, but I couldn't get it to change the font color? Thank you.
@ezelkarlkl1284
@ezelkarlkl1284 3 года назад
Thank you ver much for video. how can get backgorund color automaticly from list? I mean (in your example ) if cell's value NORTH , search it on range (I:j) and get the backgorun color from range. value is NORTH will be red background color etc...
@ExcelDestination
@ExcelDestination 3 года назад
I can give you the logic. You should use looping statement to look for the selected value and then use the matching color for background. We are a freelancing team. If you need any of the VBA Code for your project. Please let us know.
@m.n.953
@m.n.953 2 года назад
Thank you sir for nice and clear video, I have a question pleas. I make a table that contains in culomn A doctors names and the headers in row1 is the month date. Inside the table all the cells has data validation with departments in hospital to make a monthly rota shift for the doctors. The list of the data valedation contains (main department, long shift, short shift, emergency, operation room, DAY OFF). I want to make a conditional FORMATING THAT IF I CHOOSE "long shift" from the data validation automatically gives this doctor "DAY OFF" for the next day and color the cell of "DAY OFF" in red. How can I do that.( For example if I choose in C5 "long shift" automatically mak D5 "DAY OFF" with red background in B5.) thank you.
@amanranaji78
@amanranaji78 Год назад
How to make this dynamic?
@rahulsaikia9969
@rahulsaikia9969 3 года назад
Hello Sir, you have not defined cell as a variable but in my program which also consists of your following codes is giving me an error for variable not defined. Can you please tell me what it can be??
@ExcelDestination
@ExcelDestination 3 года назад
without looking at your code, I can not say anything about the error. In VBA, you can use variable without defining, that's the flexibility of VBA.
@rahulsaikia9969
@rahulsaikia9969 3 года назад
Please help me to sort this out.
@phillipswartz4879
@phillipswartz4879 4 года назад
I learned much from your presentation. I am trying to apply this to a sheet I am building. The only thing that is different is it is a table. I can not get it to work correctly. I think the issue is in the line set. What needs to be different to use this with a table?
@samawad4564
@samawad4564 4 года назад
what does "next" do at the end please?
@ExcelDestination
@ExcelDestination 4 года назад
"next" is closing statement for "For Loop". There are multiple cells in the range and for loop is to go through each cell of the range.
@shaikahmed9988
@shaikahmed9988 3 года назад
i was expecting the "macro code file" in the Description :-(
@ExcelDestination
@ExcelDestination 3 года назад
it is very short tutorial, you can pause and note the code. If you need the file, please send me email at exceldestination@gmail.com
@udaykakde4595
@udaykakde4595 2 года назад
How to go to VBA page?
@ChadFi
@ChadFi 3 года назад
a) bad that it's not a vlookup b) bad that you didn't show actually running the macro but spent 10 minutes formatting c) bad you squeezed 2 adverts into that short video d) bad it didn't work for me e) the comments saying this video is good are wrong
@Ch1n4Sailor
@Ch1n4Sailor 3 года назад
can't understand a word... so I've muted it... we'll see..
@majidtadavi9623
@majidtadavi9623 3 года назад
Vba code doesn't work. Tutor didn't even bother to run the code to check any errors... Pathetic..
Далее
Highlighting Cells Based On Value/Text - Excel VBA
10:00
Excel VBA: The Magic of the Worksheet Change Event
14:24
25 Nooby VBA Habits You Need to Ditch Right Now
8:42
Excel - Using a Macro to set Conditional Formatting
6:51
IF Formula Based on CELL COLOUR Using VBA Function
7:17