Excel Formulas Based on Cell Color - Files Included

  Рет қаралды 79,440

TeachExcel

TeachExcel

Күн бұрын

Excel File: www.teachexcel.com/excel-tuto...
Excel Forum: www.teachexcel.com/talk/micro...
Step-by-step tutorial on how to use formulas that are based on a cell's background color in Excel.
This means that you will learn to use formulas and functions like SUMIF, SUMIFS, COUNTIF, COUNTIFS, & IF to make conditions based on cell color. In addition, the methods that I show you in this tutorial allow you to make any kind of formula in Excel that is based off of a cell's background color.
This tutorial does include a macro and all files and code are included in the links higher up in this description.
TeachExcel.com

Пікірлер: 47
@TeachExcel
@TeachExcel 3 жыл бұрын
For Conditional Formatting Colors use: c.DisplayFormat.Interior.ColorIndex
@saeedrafiee1444
@saeedrafiee1444 3 жыл бұрын
Thanks but I didn't understand how to use this in conditional formatting. please give an example. Thanks you
@Iamsamsamk
@Iamsamsamk Жыл бұрын
@@saeedrafiee1444 I think I got this to work. The third line should read >>> c.Offset(0, 1).Value = c.DisplayFormat.Interior.ColorIndex
@tannertucker22
@tannertucker22 4 жыл бұрын
Always excellent. Do you have any advice on updating code when inserting adding and deleting columns? Is there a way to make the cell / range references dynamic in the code? Thank you
@tannertucker22
@tannertucker22 5 жыл бұрын
Very helpful. You tutorials are always very practical and well-explained. Thank you.
@TeachExcel
@TeachExcel 5 жыл бұрын
Thanks! Glad to help :)
@natef6477
@natef6477 3 жыл бұрын
This was SUPER Helpful!!! Thanks! I was using conditional formatting as well and the ".Value = c.DisplayFormat.Interior.ColorIndex" advice worked PERFECT. Thanks for embedding it in the comments as it saved me tons of time! :) :)
@TeachExcel
@TeachExcel 3 жыл бұрын
You are very welcome! I am glad that it helped :)) I will pin a comment with that code tidbit in it now in case it helps anyone else in the future. If you need any additional help, feel free to ask in our forum as I am not always so quick to respond here lol.
@ashisiz
@ashisiz 4 жыл бұрын
Thank you , this was really helpful, although I am wondering how can I apply if this if using google sheets instead of Excel , thanks
@StefaniePaventy
@StefaniePaventy 4 жыл бұрын
Thank you for teaching this! It has saved me a ton of time and headache.
@georgewaked7630
@georgewaked7630 3 жыл бұрын
Absolute legend -- thank you. We had teams organize status by highlight color. This allows me to start doing formulas because I have a unique number for each color. Thanks!
@TeachExcel
@TeachExcel 3 жыл бұрын
You are very welcome! I'm glad I could help! :)
@annzuber3396
@annzuber3396 5 жыл бұрын
I need to look down for my color. as my colors are in columns so offset will not work. thanks for the idea
@connieohm1543
@connieohm1543 4 жыл бұрын
Will this work for cells that have a conditional formatting for color?
@pawankasturegoing
@pawankasturegoing 4 жыл бұрын
Very helpful, thanks
@ashishdharampuria
@ashishdharampuria 4 жыл бұрын
Good Tutorial, Thanks
@Spanishgecko
@Spanishgecko 4 жыл бұрын
Hello, I love this, what would I have to change in the VBA to isolate text color instead of cell color? Thank you!
@TeachExcel
@TeachExcel 4 жыл бұрын
You can use .Font.Color = -16776961 or something like that - to figure out the number, just record a macro and set the cell to the desired color and then view that macro.
@christinevanderbur4387
@christinevanderbur4387 4 жыл бұрын
Thank you. I am trying to do a scorecard and use this. If yellow highlight of text in E3 then 5 points, If yellow highlight of text in F3 then 10 points,. If yellow highlight of text in G3 then 15 points, and in Far right Column put the Score for each line of 5, 10 or 15.
@hakanersoy5814
@hakanersoy5814 Жыл бұрын
Super it resolves my problem correctly. Thanks
@redhaakhund1271
@redhaakhund1271 Жыл бұрын
Excellent as always, How to get HEX format plz. Thanks
@GeorgeWS
@GeorgeWS 3 жыл бұрын
What if the cell coloum that has colour you’d like to change every now and again (say green and red), how do you do go about having a formula that automatically sums up said cells only when it’s fills are green and not red? Thanx in advance 😊
@kyles7472
@kyles7472 5 жыл бұрын
Select All Sub ListColors() For Each c In Selection c.Offset(0, 1).Value = c.Interior.Color Next c End Sub
@simplestockindia9897
@simplestockindia9897 5 жыл бұрын
Thank you sir
@thriftymillionaire5968
@thriftymillionaire5968 5 жыл бұрын
‪i need help comparing two cells with a high and low value, one of the cells is blue. Return 1 if the lowest value is blue color or return zero if the higher value is blue color. how do i perform this task in excel?‬
@TeachExcel
@TeachExcel 5 жыл бұрын
Depends on a few factors, please post this question on our forum along with a sample file and we can better help you there: www.teachexcel.com/talk/microsoft-office?src=yt
@cliffordageejr346
@cliffordageejr346 6 жыл бұрын
Is there anyway to do this to a column of cells that have conditional formatting set to change the color? Essentially I have a column that is set with specific texts to change the colors accordingly. But when I try to run the macro it unfortunately gives me the same code for the entire column. Instead of coding the colors I think it's actually coding the formatting instead? Any thoughts would be greatly appreciated.
@TeachExcel
@TeachExcel 6 жыл бұрын
Hi there, go ahead and ask this in our forum: www.teachexcel.com/talk/microsoft-office It's much easier to give you help there and you can upload a sample file too.
@giannisaliko9216
@giannisaliko9216 4 жыл бұрын
same problem here. Did you manage to find a solution?
@lkrizo6448
@lkrizo6448 Жыл бұрын
Hi. Can you make a formula / when i change the color of cell , the cell next to it will show todays date. Thank you
@ICCY22
@ICCY22 4 жыл бұрын
color numbers come back the same on some of the different colors - please help
@Hemzentertainmentshow
@Hemzentertainmentshow 6 жыл бұрын
Can u pliz teach us shortcut keyboard key that will be using in excel..
@TeachExcel
@TeachExcel 6 жыл бұрын
What about this one? kzfaq.info/get/bejne/gd5oZrWLu5Odn30.html
@EyeIn_The_Sky
@EyeIn_The_Sky 3 жыл бұрын
is there a way to get a "True" or "False" value by comparing the colour of 2 different cells? For Example, if Cell A1 and B1 are both filled in with Red then cell C1 should say "Match" or "True". And to base it on conditional formatting colours?
@TeachExcel
@TeachExcel 3 жыл бұрын
Just make one formula that combines the two conditional formatting formulas and apply that to the third cell and put it in an IF statement function that outputs "True" or "Match" If you need more specific help, upload some samples to our forum and ask there and it will be easier to help: www.teachexcel.com/talk/microsoft-office?src=yt_comment
@stevemaher2397
@stevemaher2397 5 жыл бұрын
This was great but did not return the result I was looking for. Cell colors that I want to identify have been created with conditional formatting (duplications give a red background). When the Macro runs it returns the result "16777215" for a blank cell. Its as if the Macro does not see the color. Any advice?
@TeachExcel
@TeachExcel 5 жыл бұрын
Conditional formatting works different. I'm not in front of Excel right now, but here is another color option: c.Interior.Color (original) c.DisplayFormat.Interior.ColorIndex (another option to try)
@mymothergeorge
@mymothergeorge 5 жыл бұрын
@@TeachExcel -That worked and thank you! Exactly what I was looking for.
@laurasmith2151
@laurasmith2151 4 жыл бұрын
It worked! Fantastic! Thank you!
@alializadeh8195
@alializadeh8195 2 жыл бұрын
ممنون
@tannertucker22
@tannertucker22 5 жыл бұрын
Is there a way to get this to work where the cells have been filled with a color using conditional formatting. I tried this on a datasheet where the cells were filled with red using conditional formatting, but the macro did not produce a number. The destination cell remained black. All of the non-red cell (no fill) did return a value (16777215 ). Thank you.
@tannertucker22
@tannertucker22 5 жыл бұрын
My fault. The destination cell was not blank. It contained 255; it was just white font for some reason.
@TeachExcel
@TeachExcel 5 жыл бұрын
no worries)
@Alhusam
@Alhusam 3 жыл бұрын
I just was wondering how excel interpreted "for each c" or whatever it is as " for each cell" in the selection although we did not declare that ?!
@TeachExcel
@TeachExcel 3 жыл бұрын
I can't look at the video now (just this comment), so I don't know the exact code that you are talking about, but, you don't have to declare variables to use them if you don't use option explicit, not usually the best idea but ok for small things like this, and making "c" equal the cell references is standard for how the For Each loop works - you could rename "c" to "myCell" or "anyOtherName" so long as it is a valid variable name.
@sunilpinto8428
@sunilpinto8428 4 жыл бұрын
Nice to know about colour character also can consider for function based on requirement. I got above clip while googling about my requirement. But not able to fix it. Can you help me to fix please. I have data in A2 to A10 as {9:15:18:25:32:35:40:48:50} and in B2 to B10 as{4:5:9:15:21:28:42:48:50} My partial requirement fulfilled with this formula in C2 to C10 "=if(ISNA(Match(A2,$B$2:$B$10,0)),A2," ")" Which gave me the result in C2 to C10 as {" ":" ":18:25:32:35:40:" ":" "} Now I coloured yellow for all cells of A2 to A10 and coloured B4 and B9 as yellow by using the colour functon I should get the result in C2 to C10 as {9:" ":18:25:32:35:40:48:" "}
@hedesonpeter8471
@hedesonpeter8471 2 жыл бұрын
I changed it to formula type in case anyone prefers it and because i had trouble figuring it out: Function FillColor(Ref) Application.Volatile FillColor = Ref.Interior.Color End Function completely based on empirical testing, there might be stuff not needed in it , sorry visual basic bros, just copied from another and chenged it until it worked
Count Occurrences of Unique Values in a List in Excel
11:43
TeachExcel
Рет қаралды 64 М.
Excel Macro Class 1 - Getting Started Programming Macros
15:47
TeachExcel
Рет қаралды 624 М.
Happy 4th of July 😂
00:12
Alyssa's Ways
Рет қаралды 63 МЛН
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 76 МЛН
10 Excel Tricks to Improve Performance - Workbook Included
21:37
Sum Cells Based on Their Color in Excel (Formula & VBA)
12:18
TrumpExcel
Рет қаралды 129 М.
8 Expert Tricks for Conditional Formatting in Excel
30:58
TeachExcel
Рет қаралды 501 М.
6 Tricks to Quickly Clean Data in Excel
12:42
TeachExcel
Рет қаралды 45 М.
How to Sum Cells by Color in Excel (Get it to update automatically)
10:54
15 MUST KNOW Excel Keyboard Shortcuts to Speed-up Work
16:56
TeachExcel
Рет қаралды 27 М.