IF Statement in Excel Based on Cell Colour

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ก.ย. 2024

ความคิดเห็น • 169

  • @pierreshen
    @pierreshen 11 หลายเดือนก่อน +4

    A note for people using Excel (or Office) in a locale that uses commas as decimal separator, don't forget to use semi-colon in the GET.CELL call to avoid "#value" errors :) Thanks for the tip that was really helpful!

  • @vernikad5061
    @vernikad5061 10 หลายเดือนก่อน

    Thank you!!!!! You saved me hours of manual work to look for specifically colored cells in large file.

  • @mishamulyakaev7406
    @mishamulyakaev7406 4 ปีที่แล้ว +4

    Exactly what I needed! TH-cam is the best education... Thank you

  • @johngreen1283
    @johngreen1283 3 ปีที่แล้ว +3

    Very helpful. This turned an impossible task into a simple one.

  • @julias7332
    @julias7332 2 ปีที่แล้ว +2

    Great tutorial, does exactly what I needed & saved me a lot of time & brain power. It works perfectly with the style colours that I have used on over 3 years worth of data & now want to use for another output/purpose, it even refreshes automatically when I apply or un-apply the style colour, thank you 😎

  • @TheSeeparag
    @TheSeeparag ปีที่แล้ว

    I just saw your once video and simply loved it for the simplicity and for its ability to solve the problem. Then I had another problem I searched for solution and guess what... your video (this) popped up again.... needless to say it was exactly what I was looking for.... and then without delaying I subscribed for the channel. Absolute appreciate your work....

  • @brabreborbisia9924
    @brabreborbisia9924 ปีที่แล้ว

    thank you thank you thank you thank you!
    I have been looking for a way to do this on and off for the past 5 years.
    Thank you again!

  • @robinfoster2696
    @robinfoster2696 4 ปีที่แล้ว +2

    Wow - that is an amazing trick. I have bookmarked this for future use and thank you very much for your free tutorial. I will DEFINITELY use this again!

    • @ChesterTugwell
      @ChesterTugwell  4 ปีที่แล้ว

      You are welcome!

    • @jaandel1
      @jaandel1 6 หลายเดือนก่อน

      ​@@ChesterTugwellhow can extract color code using the contional formating.. this just work if you actually use the color only

  • @djvicks21
    @djvicks21 3 ปีที่แล้ว +20

    Thanks Chester. This is a brilliant tutorial. But I tried this and realized this doesnt work on cell colored using conditional formatting. Is there a workaround to that?

    • @tuckernorris7479
      @tuckernorris7479 ปีที่แล้ว

      Did you ever find a solution to this?

    • @TrueSpeaker-gx5tw
      @TrueSpeaker-gx5tw 8 หลายเดือนก่อน

      I would be interested in that as well

  • @TheReal_Dave
    @TheReal_Dave ปีที่แล้ว +2

    Super useful! Nice video. Rather than the format painter, I just get in the habit of hitting Ctrl-Alt-F9 if I update any of the shading/fill colors. Ctrl-Alt-F9 tells Excel to recalculate all of the formulas inclusive of that property.

  • @lisaraley6904
    @lisaraley6904 2 ปีที่แล้ว

    Thank you SO much for putting together this video. Fantastic!!!

  • @sarvasan
    @sarvasan 2 ปีที่แล้ว

    Spent days searching blogs and vids before i found your "work arounds" - Well done!! For those finding that other cells not being updated, I found that if your press the "filter" pull down and press OK, it 'refreshers' & updates the other cells... worth a try?

  • @deghazbalsa
    @deghazbalsa 2 ปีที่แล้ว

    Thank you very much Chester........ you make my work much easier......

  • @marctemura2017
    @marctemura2017 2 ปีที่แล้ว

    Chester that is some great outside the box thinking. Keep up great work. 👍⭐

  • @eddiesneeh4266
    @eddiesneeh4266 3 ปีที่แล้ว +2

    Outstanding! Thank you!

  • @spacebasedsolarpowersbspsb6548
    @spacebasedsolarpowersbspsb6548 4 ปีที่แล้ว

    Excellent...
    Very step by step explanations...
    Keep up the good work bro.....
    Thanks thanks thanks....

  • @rich_banana5451
    @rich_banana5451 5 หลายเดือนก่อน

    You are actually the greatest of all time

  • @augustinestephensteve7rock327
    @augustinestephensteve7rock327 2 หลายเดือนก่อน

    God bless you.. this works perfectly.

  • @TeamHuanimal
    @TeamHuanimal ปีที่แล้ว

    took me forever to find this, thank you so much for the video!!!

  • @CaspianKR
    @CaspianKR 2 ปีที่แล้ว +2

    Is there a way to make this work with conditional formatting colours? The ifstatements don't seem to like conditional format colors

  • @advent7324
    @advent7324 ปีที่แล้ว

    Great and useful tip Chester. Thanks

  • @jacquiboyce2216
    @jacquiboyce2216 2 ปีที่แล้ว

    Brilliant!! This is exactly what I was looking for!

  • @adammiller2914
    @adammiller2914 3 ปีที่แล้ว +1

    Excellent tutorial, this saved me a great deal of manual sorting!

  • @cadcar13
    @cadcar13 3 ปีที่แล้ว +2

    This is awesome, thank you! I've been trying to solve this problem for months! Appreciate you sharing this info!

  • @priyachandrasena7729
    @priyachandrasena7729 ปีที่แล้ว

    Thanks very much for the tutorial !

  • @ElishaPlaytime
    @ElishaPlaytime 2 ปีที่แล้ว +1

    Hi, Can you help me please, I have 2 sheet, the other sheet is to copy the main sheet, but I want to make it not copy the data from the main if the cell color is gray. can you help me how to do it please.. Thanks

  • @jeannesarfatyglazer5005
    @jeannesarfatyglazer5005 2 ปีที่แล้ว

    This was incredibly useful. Thank you so much for sharing!

  • @michaelvictor9107
    @michaelvictor9107 6 หลายเดือนก่อน

    Thank you so much🙏🙏worked like a charm

  • @jiricapek2603
    @jiricapek2603 ปีที่แล้ว

    Thank you! Very useful....!!! Appriciated

  • @jasonlamsen
    @jasonlamsen 3 ปีที่แล้ว +5

    Hi, thanks for the video! I have a problem same with others, Everytime I drag down the cell it only returns 1 value (based on the original cell where its color is based on). I already removed the'$' on the formula.

  • @ngunghuong6938
    @ngunghuong6938 2 ปีที่แล้ว

    Thank you so much, this is so helpful to me.

  • @Msedk
    @Msedk 4 ปีที่แล้ว

    Works wonders. Thanks a million for this little trick. Makes a world of difference. :-)

  • @mikepope666
    @mikepope666 3 ปีที่แล้ว

    Works like a charm... Thanks!

  • @GhotiTehFish
    @GhotiTehFish 2 ปีที่แล้ว

    Thanks man, saved me some time!

  • @RockyBevo
    @RockyBevo 2 ปีที่แล้ว

    Thanks Brotha!

  • @rajeshshah6758
    @rajeshshah6758 3 ปีที่แล้ว

    Thanks Chester. This is what I have been looking for. You just made my work very easy.

  • @xyclos
    @xyclos 10 หลายเดือนก่อน

    Fanstastic!! Thanks a lot!!!

  • @mbowick123
    @mbowick123 6 หลายเดือนก่อน

    this is so helpful!!! thank you :)

  • @jackiebrown7223
    @jackiebrown7223 ปีที่แล้ว

    Thanks for this tutorial

  • @Mugen89K
    @Mugen89K 2 ปีที่แล้ว +1

    Hello, sorry if you answered this already, but can you do the same but with FONT color instead of cell color? thank you!!

  • @mkparker99
    @mkparker99 ปีที่แล้ว

    Brilliant! Very helpful!

  • @joebaxter2159
    @joebaxter2159 2 ปีที่แล้ว

    Excellent. Thank you!

  • @DragonsTaco
    @DragonsTaco 2 ปีที่แล้ว

    This is fantastic, works great! I used the concept to create a table that used row color to group together rows with the same key values to make it more legible. I've tried every VBA method to do this before and while it would work it is so much more complicated than this. It gives me all kinds of ideas to use the Name Manager in the future. Thanks for the short but really valuable lesson! 💪

  • @ColorCopiesUSA
    @ColorCopiesUSA 2 ปีที่แล้ว

    This was geniously done! Thanks

  • @nikhilnayak9700
    @nikhilnayak9700 2 ปีที่แล้ว +5

    Hi Chester. Thank you for this, another brilliant workaround. I have a question regarding Colors in conditional formatting. This approach doesn’t seem to capture the cell background Color for those cells that have been formatted by a condition.
    Is there a way to capture these as well?

    • @kevinmcaulay964
      @kevinmcaulay964 ปีที่แล้ว +1

      This was the exact question I was coming on ti ask. Did you ever get a response?

  • @georgiivanov1902
    @georgiivanov1902 3 ปีที่แล้ว

    Thank you for the tip. Saved me lots of time!

  • @nye1762
    @nye1762 3 ปีที่แล้ว +8

    Can you uss this function in connection with a cell that is conditionally formatted? I have a column of record ID with corresponding where duplicate IDs are conditionally formatted. I need an IF statement to find the cells conditionall formatted and extract the corresponding value. The method here does not recognise the conditional formatting of duplicate cells. is there a way?

    • @nitiwat_a
      @nitiwat_a 2 ปีที่แล้ว

      Did you find the solution? I am struggling with the same situation.

    • @pablomonterroso7135
      @pablomonterroso7135 ปีที่แล้ว

      I have the same problem... Do y'all find a solution?

  • @barden82
    @barden82 2 ปีที่แล้ว

    Cheers for this!

  • @15ti_Maj_23.
    @15ti_Maj_23. ปีที่แล้ว

    Great work!

  • @MariaRodriguez-tf5ms
    @MariaRodriguez-tf5ms ปีที่แล้ว

    Thanks!!

  • @habibsicttutorials6684
    @habibsicttutorials6684 4 ปีที่แล้ว +1

    Nicely done.

  • @laurentiumocanu5907
    @laurentiumocanu5907 ปีที่แล้ว

    Works 4 me, but but instead of a comma after "38" I have to put a semicolon. 10X!!!

  • @edgarslapins3995
    @edgarslapins3995 3 ปีที่แล้ว +1

    Sadly doesn't work on google sheets, any recommendations? Thanks

  • @shivabalan3255
    @shivabalan3255 ปีที่แล้ว

    Thank you for your help sir

  • @haseebkhalid7963
    @haseebkhalid7963 2 ปีที่แล้ว

    Brilliant. Saved a lot of time..

  • @sajjadabouei6721
    @sajjadabouei6721 2 ปีที่แล้ว

    OG
    thank you man

  • @fabiobordignon3840
    @fabiobordignon3840 2 ปีที่แล้ว

    Good stuff, thanks!!!

  • @naifalismail815
    @naifalismail815 3 ปีที่แล้ว

    Thank you, saved a lot of time

  • @nooramin4614
    @nooramin4614 2 ปีที่แล้ว

    Thanks heaps

  • @drwumaths9862
    @drwumaths9862 2 ปีที่แล้ว +1

    This is fab! It works on the pre-set colours. I tried to use it on conditional formatted colours it doesn't quite work. For example, if I colour a cell grey, it returns "15"; but if the cell has no pre-set colour but was conditional-formatted as grey, this formula returns "0", same value as other cells that are the blank default cell colour. Do you know a way to obtain the colour codes for the conditional formatted colours?

  • @bluesage1528
    @bluesage1528 4 ปีที่แล้ว

    This is VERY creative!

  • @hossammaarek
    @hossammaarek 2 ปีที่แล้ว

    Fantastic .. THANK YOU

  • @himanshubhatt1783
    @himanshubhatt1783 4 ปีที่แล้ว

    Hi, thanks for the simple solution. Just to add, the same file should work with Binary format also.

  • @rosimarhernandez8572
    @rosimarhernandez8572 2 ปีที่แล้ว +4

    I’m loving all your tutorials Chester! Thank you so much for explaining things so well 🤗. I created a color coded, 8 items, drop down list in one of the cells and I would love to make the cells to the right side of this one to take on the same color/pattern (achieved with conditional formatting) of the selection of that cell on the left. The right side columns have their own drop down lists but I made them colorless in order to duplicate the colors/patterns contained in the other one. Is this even achievable?

  • @ozanyigit9820
    @ozanyigit9820 9 หลายเดือนก่อน

    Thank you so much!

  • @kempisabel9945
    @kempisabel9945 3 ปีที่แล้ว

    life saver!! thank you!!

  • @danp6101
    @danp6101 4 ปีที่แล้ว +7

    Does Not Work,What Version Excel are you Using

    • @maatwerkengineering3398
      @maatwerkengineering3398 ปีที่แล้ว +3

      =GET.CELL is for English versions of Excel, it is different in other languages

  • @erlanggahawal85
    @erlanggahawal85 4 ปีที่แล้ว

    Brilliant Idea.
    I'm sorry if i dont see your video fully or another your video. how we set this formula (an IF based on cell colour), but in vertical area? because your formula is working through horizontal area. thanks

  • @lkrizo6448
    @lkrizo6448 ปีที่แล้ว

    Hi. Could you make a formula - if you change the color of cell, next cell to it, will show todays date. Thank you

  • @SamehMustafa007
    @SamehMustafa007 4 ปีที่แล้ว

    Perfect so Brilliant idea👍👍👍

  • @annamccutcheon-qt8iv
    @annamccutcheon-qt8iv ปีที่แล้ว

    Thanks for this. I have tried it but the value I get for all cell colours is zero. Have followed step for step. Any chance the code for cell colour in get.cell has changed from 38? I am using excel (MS Office suite) on a Mac. Any chance that is why it isn't working for me? Thanks

  • @kellybollman4034
    @kellybollman4034 2 ปีที่แล้ว +2

    This is amazing! Can this be used to count the number of cells in a row that are the particular target background color? If so, how?

    • @mmmaurox
      @mmmaurox 2 ปีที่แล้ว

      i have the same question

    • @cindymiller4988
      @cindymiller4988 ปีที่แล้ว

      You should be able to do the same thing except replace the countif, for the if statement.

  • @DenisFourie
    @DenisFourie 2 ปีที่แล้ว +5

    Is there a way to do exactly that, but based on the TEXT colour instead of the CELL colour?
    Thanks for the info.

  • @AlexiaBoubouli
    @AlexiaBoubouli 3 ปีที่แล้ว +1

    Dear Chester, thank you for the video, I have problem getting different values for each colour. If the cell has a value and then i delete the value refresh the cell then only it shows different numbers, if I drag down the formula it does not work, is there something you would recommend? thank you

  • @anmac6910
    @anmac6910 ปีที่แล้ว

    How do I use a coloured cells's value itself to highlight secondary duplicates like finding colpured cells value first then using that value to highlight another set of duplicates? Kinda like highlighting secondary uplicates after finding the first

  • @geoffreymallett2295
    @geoffreymallett2295 4 ปีที่แล้ว

    This is awesome. Thanks for the help!

  • @sasavienne
    @sasavienne 4 ปีที่แล้ว +1

    Thank you so much. My only problem is that when I change the color of any cell. The formula does not update automatically. I would be thankful, if you can suggest any solution. Thank you so much. 🌟

    • @theIfrit552
      @theIfrit552 4 ปีที่แล้ว

      4:57.. he talked about that

  • @EyeIn_The_Sky
    @EyeIn_The_Sky 4 ปีที่แล้ว +1

    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"?

  • @laurenluo1462
    @laurenluo1462 4 ปีที่แล้ว +2

    Thank you Chester! I tried your method, but regardless what color I have, when I type in "=CELLCOLOUR", it returns the same value to every single color. For example, I had cells in yellow, green and red, but number 6 is returned for all the colors. Would you please advise on this? thank you very much!

    • @widepootis
      @widepootis 2 ปีที่แล้ว

      have you saved your file as a macro-enabled worksheet? that worked for me as soon as I did that

  • @dhunpagla3871
    @dhunpagla3871 4 ปีที่แล้ว

    Thanks Mr Tugwell...awesome 👌

  • @chongandrew5498
    @chongandrew5498 ปีที่แล้ว

    Is it possible a vbn code to refresh calculation of a vbn created formula? thanks

  • @maazziuche28
    @maazziuche28 8 วันที่ผ่านมา

    Learnt ❤

  • @DavidAFleming
    @DavidAFleming 4 ปีที่แล้ว +2

    Do you know if you can do this with Conditional Formatting? The tip works great for fields that have been coloured by hand, but i can't get it to work for Conditional cells.

    • @ChesterTugwell
      @ChesterTugwell  4 ปีที่แล้ว +1

      Hi Dave. It won't work with conditional formatting unfortunately. However, the conditional formatting must be based on a test, so all you do is use the same test in the IF statement. No need to use colour as your IF test.

    • @danc30nsuns3t
      @danc30nsuns3t 4 ปีที่แล้ว

      @@ChesterTugwell How can this be done when your test is for duplicate values?

    • @hollyclark3731
      @hollyclark3731 3 ปีที่แล้ว

      @@ChesterTugwell I am trying very hard how to figure this out with an IF Top 5. Any pointers or other videos you've done that may be helpful?

  • @tonyeckel6524
    @tonyeckel6524 2 ปีที่แล้ว +1

    Great Information - That being said: the usage of Application.CalculateFull will drive the recalculation desired.
    My challenge was a reconciliation sheet where I wanted to mark the cleared cells "yellow" and then recalculate a dynamic balance. Downside is that I couldn't get Sumif() to accept the CellColor=6 reference as input criteria. So created a hidden cell with =IF(CellColor=6,"X","") to drive the SUMIF, but as you discovered, the cell formula will not respond on color changes, and there doesn't appear to be a worksheet event that format changes will trigger [directly].
    In the end, because the sheet HAD to be saved as XLSM, simply created a macro to toggle cell color and attached it to the worksheet as Ctl+Shift+"X" (we are reconciling here) and added Application.CalculateFull at the end of that macro. That drove a keyboard based color toggle on that worksheet that recalculated to change the hidden cell "X", and dynamic recalculation. (Hello Microsoft - an event on the worksheet cell format changes is in order)
    Your input on color sensitive formulas was invaluable - Thanks.

  • @tbrizzo
    @tbrizzo 3 ปีที่แล้ว +1

    Nice video Chester!
    I was actually looking for another kind of function, can you help me out?
    I want to return the cell's text on a given interval, if that cell have a specific color. For example, if only one cell from A1 to A10 is red, i want the function to return whatever is written in that red cell.
    Is it possible? Can you help me out?

  • @gauravchhajed3417
    @gauravchhajed3417 3 ปีที่แล้ว +1

    GET.CELL trick won't work if the cell is filled using conditional formatting

  • @dfinkel22
    @dfinkel22 3 ปีที่แล้ว

    Great job!

  • @AdaLovesLife
    @AdaLovesLife 4 ปีที่แล้ว

    Really good! Thank you for the great video!

  • @daurren3253
    @daurren3253 4 ปีที่แล้ว

    THANK YOU MY GUY

  • @shripadlale7476
    @shripadlale7476 3 ปีที่แล้ว

    Brilliant! Thanks a ton!

  • @alializadeh8195
    @alializadeh8195 2 ปีที่แล้ว

    Thanx

  • @jssp4709
    @jssp4709 3 หลายเดือนก่อน

    Most of the time I would use this with conditional formatting but it doesn’t detect it. It only brings back the original background color.

  • @jozefnagels8443
    @jozefnagels8443 5 หลายเดือนก่อน

    excellent

  • @hasan_zafaranchi
    @hasan_zafaranchi 2 ปีที่แล้ว

    very good, thanks a lot, I have a problem on this: when I save it and close the excel and open that file again, the defined formula doesn't work :( would you help me please.
    ( I save in xlsm format )
    xlsx also doesn't work.

  • @thiagoleite1989
    @thiagoleite1989 8 หลายเดือนก่อน

    Thank you for the tutorial! However I noticed that if the color comes from conditional formatting (for example for duplicate amounts) the get.colour won't work :/ Any way around that?

  • @ravillatorom
    @ravillatorom 3 ปีที่แล้ว

    It works great, but want to use the workbook as a templete. Cleared all colors back to white cells, but even if the colored field is back to white, the cel color formula keeps naming the wrong color. Is like the formula doesn't auto refresh. I tried the refresh icon, but it didn't update either

  • @daiphillips877
    @daiphillips877 7 หลายเดือนก่อน

    To use font colour instead of cell colour, use 24 instead of 38

  • @fn2826
    @fn2826 2 ปีที่แล้ว

    Very Interesting, however I have a question and I wonder if you can help: I don't need to apply discounts, but instead i want it to simply count from Col. A to Z (for example) and display 24 in the end result (I use this to create work planner, so each colored cell represent 1 hr of work), Not sure if this is possible, and thank you in advance

  • @stevennye5075
    @stevennye5075 4 ปีที่แล้ว

    Great idea!

  • @gabesteinert9545
    @gabesteinert9545 2 ปีที่แล้ว

    I have no name manager tab. Any suggestions as what to do??