Тёмный

Change the Color of the Active Cell in Microsoft Excel 

MyExcelOnline.com
Подписаться 142 тыс.
Просмотров 34 тыс.
50% 1

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

 

22 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 86   
@khaleditani4064
@khaleditani4064 2 месяца назад
Thank you for the thorough explanation, this the best tutorial ever
@MyExcelOnline
@MyExcelOnline 2 месяца назад
You're very welcome!
@bdonovable
@bdonovable 2 месяца назад
Exactly what I was looking for! This was a very well executed tutorial. -Thank you!
@MyExcelOnline
@MyExcelOnline 2 месяца назад
You're very welcome!
@elmolewis9123
@elmolewis9123 2 месяца назад
Excellent presentation but I have two questions. Will this work on each sheet of a multi-sheet workbook and will it work on any new xlsm I create?
@MyExcelOnline
@MyExcelOnline 2 месяца назад
If it's a new spreadsheet, then you will need to apply the same code to it as well.
@dolittlediehard1670
@dolittlediehard1670 Год назад
Very good ❤. It's a real pity that we have to appeal to VBA when it just be an option you can choose.
@MyExcelOnline
@MyExcelOnline Год назад
Yeah that would have been a good choice for an option.
@JeniseJensen
@JeniseJensen Месяц назад
This was a great tutorial, thank you. I ran into one problem though, as we color code some of the rows in our worksheets to indicate status of that item. I can no longer select a row (or a cell) and fill it with a specific color when I choose to do so. Is there a way to run this macro/vb and allow me to purposely select a row and fill with the color of my choice? Or is it an either or situation? The active cell VB is helpful for viewing during a meeting, but the specific selection of color fill is helpful for tracking at another time, if that makes sense. Any advice or info appreciated. Thank you!
@MyExcelOnline
@MyExcelOnline Месяц назад
Yes, you could write code to choose a specific color or get the color from a range of colors. You could even pre-color some cells to the right or left and have the user select a color before running the macro.
@nancylaneve9211
@nancylaneve9211 Год назад
I did everything you did to the letter and it didn't work.
@MyExcelOnline
@MyExcelOnline Год назад
Hi. Sorry to hear that! Were you able to download the sample file in the link in the description and try that one?
@jasonasselin8657
@jasonasselin8657 Год назад
@@MyExcelOnline i have also tried the sample file and the functions do not work on them either. i wonder if there is a system setting blocking macros or something
@MyExcelOnline
@MyExcelOnline 9 месяцев назад
That is possible. There is the Trust Center in Excel that you may need to enable. You can do that by putting the Excel file in a folder that you want to use and then open up Excel and go to File|Options. Go down to Trust Center then Trust Center Settings. Pick Trusted Locations and then Add New Location and select the folder where you put the Excel file above. Hope that helps!
@tarayagos401
@tarayagos401 13 дней назад
Thanks for this info - exactly what I'm looking to do. When I try to run the macro, I get a Run-time error '1004' which I then select "debug". It highlights the Selection.Interior.Color = vbBlue line. Any idea what I'm doing wrong? Thanks!
@MyExcelOnline
@MyExcelOnline 13 дней назад
Hi. Sure, you could probably just get the actual number for vbBlue. You can do this by recording a macro, turning the color of the cell to the color you would like, stop the macro and see what it wrote and then paste that line into the one above. Or, you could try downloading the practice file (link in description). Hope that helps!
@tarayagos401
@tarayagos401 13 дней назад
@@MyExcelOnline Thanks for the help... it ended up being that I had protected cells in my spreadsheet - that caused the error. 🤯 All fixed now! Thanks again for the help with this!
@MyExcelOnline
@MyExcelOnline 12 дней назад
Oh, that's great! So glad you found a solution!
@vkain100
@vkain100 3 месяца назад
@3:20 I don’t see “option explicit” what I’m I missing?
@MyExcelOnline
@MyExcelOnline 3 месяца назад
Thanks for the question! If you don't see it, you can just type it in.
@ericvalerio1231
@ericvalerio1231 2 месяца назад
This is very helpful! But when i save the worksheet as macro enabled and close it, it wont work anymore when i re-open it. What did i miss?
@MyExcelOnline
@MyExcelOnline 2 месяца назад
Have you changed the file type to ensure your macro gets saved?
@ericvalerio1231
@ericvalerio1231 2 месяца назад
@@MyExcelOnline that was it. got it, thanks!!! I have another question tho. can we also change the color of just the border instead of filling a cell?
@MyExcelOnline
@MyExcelOnline Месяц назад
Yes you can! You could try something like this for the Bottom (you can also replace bottom with top, left or right) Range("A1").Borders(xlEdgeBottom).LineStyle = XlLineStyle.xlContinuous Range("A1").Borders(xlEdgeBottom)..Color = RGB(255, 0, 0)
@ericvalerio1231
@ericvalerio1231 Месяц назад
@@MyExcelOnline I will try it. Thank you again!!!😃
@MyExcelOnline
@MyExcelOnline Месяц назад
Great! Hope it helps!
@bigboss-ph3bu
@bigboss-ph3bu 11 месяцев назад
Thank you ma'am
@MyExcelOnline
@MyExcelOnline 11 месяцев назад
Most welcome 😊
@sergiimakhalov8526
@sergiimakhalov8526 Год назад
Hi, thank you for this video. What if I want to change the color only for the indicated range, how to do it? Thank you for the answer.
@MyExcelOnline
@MyExcelOnline Год назад
You're welcome. Thanks for watching! In that case, you could set a range variable to the current selection. Try this: Dim rng as Range Set rng = Selection
@CountryFunBalls
@CountryFunBalls 8 месяцев назад
Thanks alot it worked for me. I just need one assistance. I want to make some cells background colours remain unchanged even if they become active cells. I need your assistance in this. Please if you can guide thanks.
@MyExcelOnline
@MyExcelOnline 8 месяцев назад
So glad it worked for you. Yes, we can help you. If you go here: www.myexcelonline.com/microsoft-excel-consulting-services/ you can ask our consulting services to help you be more specific in what you are hoping to accomplish.
@djgoldengates9574
@djgoldengates9574 Год назад
Thank you for the great video. I wanted to ask. Lets say once the cell is clicked and changed color. Is there a way to re click on that cell to remove the color and back to its original state
@MyExcelOnline
@MyExcelOnline Год назад
Yes. You would need a variable to keep track of the previous cell and then change that cell to no color when you change the color of the current cell. Hope that helps!
@japiesnyders5355
@japiesnyders5355 4 месяца назад
After I've changed the active cell color, the color of all my colored columns is deactivated. Who do I keep my column color.
@MyExcelOnline
@MyExcelOnline 4 месяца назад
You could try using VBA to change the previous cell back to the original color before changing the new one.
@jawadhindi646
@jawadhindi646 5 месяцев назад
Can you make a drop-down list of 3 colors to choose one color? I want to color every cell with either green, orange or red. The cells have different text in them. Thank you
@MyExcelOnline
@MyExcelOnline 5 месяцев назад
Yes you could! You would need to create a Case statement in VBA and set a variable to the chosen color.
@jawadhindi646
@jawadhindi646 5 месяцев назад
@@MyExcelOnline can you please create a video on that. Thank you
@MyExcelOnline
@MyExcelOnline 5 месяцев назад
I'll add it to the list.
@phamhunggg
@phamhunggg Год назад
thank you
@MyExcelOnline
@MyExcelOnline Год назад
You're welcome!
@baddonkeyNL
@baddonkeyNL 24 дня назад
I got this working alongside other options. Now the only problem im having, (i use it to find boxxes in the rack) i work from a searchlist that links to the other sheet, now does this active cell color only work when the sheet is allready clicked in. So in short If i open excel search the part i need i click the link and excel redirects me to the cell i need but the color only starts working the selection after that one How do i fix this
@MyExcelOnline
@MyExcelOnline 24 дня назад
I think you would have to write another function for the initial selection. If you would like help with a specific sheet, feel free to go here: www.myexcelonline.com/microsoft-excel-consulting-services/
@baddonkeyNL
@baddonkeyNL 24 дня назад
@@MyExcelOnline thanks for your reaction, i use it for something at work but its my own thing to fiddle with this so unfortunately i can't get funding for it. Thanks anyway ill keep on searching and trying
@MyExcelOnline
@MyExcelOnline 21 день назад
Hope you find what you're looking for!
@billwright8640
@billwright8640 7 месяцев назад
Hello! Is there a way when you click on a cell, that only changes the color of the cell border while it is clicked on so I can just look at the sheet and see the selected cell easier because it is a different color while clicked on and when I click off the cell it is back to normal?
@MyExcelOnline
@MyExcelOnline 7 месяцев назад
Yes. in VBA instead of changing the backcolor, you could change the borders like this: rngRange.Borders(xlEdgeBottom).LineStyle = xlContinuous rngRange.Borders(xlEdgeBottom).LineStyle = .Weight = xlThin And you could repeat that for xlEdgeTop and xlEdgeRight and xlEdgeLeft You can also set the previous cell back to the original color if you would like. Hope that helps!
@mohammed_saeed32
@mohammed_saeed32 Год назад
I’m facing a problem, if i have a coloured cell already then I activate this feature in this vid .. once I select this coloured cell then move .. the old color will disappear. So please your advice
@MyExcelOnline
@MyExcelOnline Год назад
Oh, that's interesting... You could set a variable to keep track of the old color and instead of changing it back to transparent, you could set it back to the old cell color value. Hope that helps!
@pocinog
@pocinog 5 месяцев назад
@@MyExcelOnline Hi. Which variable that will be? I am a normal user no code skills. Thanks.
@dokprokumsgu1982
@dokprokumsgu1982 10 месяцев назад
its work, but... when i block some cells, that can't blocked, & can't undo the value of cell or other backward step, its like unnormal excel, how to normally work, but still use the macro?
@MyExcelOnline
@MyExcelOnline 10 месяцев назад
Thanks for the question. I believe some tasks done via VBA do not allow for Undo. In other words, once the code has been run, Undo is no longer an option.
@neelimasingh6043
@neelimasingh6043 8 месяцев назад
It works on one sheet of my workbook but not on the other sheet. What could be the reason?
@MyExcelOnline
@MyExcelOnline 8 месяцев назад
It may just work from the current sheet. You could do Worksheets("the name of your sheet") select first before the code run. Hope that helps!
@lainajb5256
@lainajb5256 Год назад
So this is not working in a shared workbook. Do you have a different way to complete this task?
@MyExcelOnline
@MyExcelOnline Год назад
Are you using the online version of Excel or the one for Windows?
@micheauxdechanel1995
@micheauxdechanel1995 Год назад
how do you do this without VBA removing existing conditional formatting?
@MyExcelOnline
@MyExcelOnline Год назад
You may need to reapply the conditional formatting via VBA after the VBA code runs. It depends on how you have that formatted. You could record a macro and then look at the code to see how that is done.
@ayelethassan8333
@ayelethassan8333 Год назад
is there an easy way to apply this to all my excel files and sheets?
@MyExcelOnline
@MyExcelOnline Год назад
Yes. You can either copy the macro into the file where you want to use it or you can leave the file with the macro already in it open and you should be able to go to the macro menu and select the function from the open file with the macro.
@BirgemBorg
@BirgemBorg 9 месяцев назад
Do you know hot change color of cell frame when we search excel file? Sometimes when i search something in excel I can't see result because the cell frame color is light green and can't find it because of black color of tables.
@MyExcelOnline
@MyExcelOnline 9 месяцев назад
Hi! I think you can select all the cells with CTRL+A and then right click click and go to Format Cells. Then click on border and change the color to something you would like and then click Outline and Inside. You can also change the cell fill color here on the Fill tab. Hope that answers your question.
@BirgemBorg
@BirgemBorg 9 месяцев назад
@@MyExcelOnline Thanks, but I need solution when I search some text in Sheet and excel find this cell, but I can't recognize where it is, because searched cell frame is some kind of light green color and I can't see it. I need this cell frame to be red colored in order to recognize imidiatelly.
@MyExcelOnline
@MyExcelOnline 9 месяцев назад
OK. That sounds a little more specific than what we are showing here. If you would like further help, please check out our consulting services where we can help with specific questions: www.myexcelonline.com/microsoft-excel-consulting-services/
@craigyamasaki8315
@craigyamasaki8315 Год назад
i don't see the "Option Explicit" in my VBA window; also i previously tried a different approach to highlighting an active cell which worked fine except it disabled the "undo" and "redo" functions.
@craigyamasaki8315
@craigyamasaki8315 Год назад
OK figured out the Option Explicit, but similar to other techniques I used to highlight an active cell, once I perform an action, the undo and redo functions are disabled; is there a fix for this?
@MyExcelOnline
@MyExcelOnline Год назад
Sometimes when you do actions through VBA, there unfortunately isn't an undo.
@Rajsinghantil
@Rajsinghantil Год назад
Namaste
@MyExcelOnline
@MyExcelOnline Год назад
😀
@finleyknowles7207
@finleyknowles7207 Год назад
Great video. My first time to find your channel. I would like to have a color that is faint as opposed to the bold blue or red. What is the code for other color options?
@MyExcelOnline
@MyExcelOnline Год назад
Hi! Thanks for watching! You could record a macro that changes the color of the cell to the color you would like and then look at the VBA code for that color and then change the vbRed or vbBlue to that code. Hope that helps!
@finleyknowles7207
@finleyknowles7207 Год назад
@@MyExcelOnline Thank you very much.
@MyExcelOnline
@MyExcelOnline 9 месяцев назад
You're welcome!
@Nivlactollrj
@Nivlactollrj 9 месяцев назад
I cannot stand the white background in excel. I have changed the color of the background. However, As I enter data, the field (not the font) being entered turns white while typing. How do I code to change the temporary color from white while typing?
@MyExcelOnline
@MyExcelOnline 9 месяцев назад
Great question! You could try by selecting all cells with CTRL+A and then going to Home → Styles → Cell Styles → Normal → Modify. From there, select the neutral yellowish color. Or some of the other options may work as well. You can also add a custom color there. Let us know if that works!
@Nivlactollrj
@Nivlactollrj 9 месяцев назад
@@MyExcelOnline This does the trick of not having the cell present with white background--while typing--. However, when I select print, the color of the background now prints as well. To be clearer....Initially I used powerpoint to select a color for the background and save it as a png. Then I would select the color for the background. When I select print, the background color does not show and does not waist in. The only problem is that when typing, the cell presents as white when typing and when you complete entry and leave the cell, it turn the color of the background (which is the good part). I just hate that the cell is white *while typing*. Any suggestions?
@MyExcelOnline
@MyExcelOnline 9 месяцев назад
I would suggest you contact out consulting services for help with such a specific issue. The link to that is: www.myexcelonline.com/microsoft-excel-consulting-services/
@LauryDepp
@LauryDepp Год назад
how does the line " option explicit show-up? did u skip a step? Is my Excel version the problem? it has to be an easier way. Are you telling me Microsoft in 20 years do not have this developed?
@MyExcelOnline
@MyExcelOnline Год назад
It is usually in there by default, but you can type it in there yourself.
@krishnagupta7575
@krishnagupta7575 Год назад
How can i change colour permanently (cursor)
@MyExcelOnline
@MyExcelOnline Год назад
For the active cell? Or for the cursor? For the cursor, that would most likely be a windows setting.
@Gregory-m2k
@Gregory-m2k 7 месяцев назад
Add all lines so people can just copy and paste :)
@MyExcelOnline
@MyExcelOnline 7 месяцев назад
Hi. Just curious what you mean by that? Do you have another way to change the color of the cell that's currently being clicked on?
@grivesaston0385
@grivesaston0385 11 месяцев назад
hoe to do undo?
@MyExcelOnline
@MyExcelOnline 11 месяцев назад
You mean after executing the macro? Or disabling the macro?
Далее
Highlight Active Row & Column in Excel (7 Levels)
22:56
10X Your Excel Skills with ChatGPT 🚀
11:39
Просмотров 3,3 млн
HA-HA-HA 👊  #countryball
00:15
Просмотров 2,7 млн
Master VBA Code Loop in Excel - 3 Types of VBA LOOPs
9:13
7 Things You're Doing WRONG⚡in Excel
15:22
Просмотров 1,2 млн
IF AND OR Formula in Excel with MULTIPLE CONDITIONS
17:32
Best NEW Excel Features EVERYONE Needs
9:20
Просмотров 384 тыс.
HA-HA-HA 👊  #countryball
00:15
Просмотров 2,7 млн