+ Reply to Thread
Results 1 to 28 of 28

Sum cell colors in a column without Macros?

  1. #1
    Forum Contributor Brian.Aerojet's Avatar
    Join Date
    03-25-2017
    Location
    TN-USA
    MS-Off Ver
    2016 365
    Posts
    173

    Sum cell colors in a column without Macros?

    Hi All,

    I figured I would not need a example of my worksheet for this question.

    Is there anyway possible to "Sum" a worksheet in one column based on the cell color without using Macros?

    Soon as I added the macro which does work good, but my worksheets slowed down so much it is taking me forever to get anything done.

    I was trying to figure out a way to sum the columns without the macros

    Thanks In advanced,
    Brian

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Sum cell colors in a column without Macros?

    you can use SUBTOTAL(9, full_range) and then filter by color

  3. #3
    Forum Contributor Brian.Aerojet's Avatar
    Join Date
    03-25-2017
    Location
    TN-USA
    MS-Off Ver
    2016 365
    Posts
    173

    Re: Sum cell colors in a column without Macros?

    Thanks Sandy,

    My goal is to speed up my excel workbook.

    Since I added Macros to one of my excel sheets, things went real slow after that.

    Is there other ways I could speed up the loading when I enter data?

    I have 16 sheets in one workbook, if i get rid of any of the sheets, my formulas will not work.

    Im new to excel formulas, so any help would be appreciated.

    Thanks
    Brian

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Sum cell colors in a column without Macros?

    No see excel file - no idea

    You can:
    1. build a database on SQL server and get data from there into excel (most of the operation can be done just on server before you get data)
    2. reorganize your data in excel or divide it to database excel and front excel file
    3. check your formula (array, non-array) - too much array formulas slows excel (use defined ranges, eg. $A$1:$A$10 not A:A)
    4. remove unneccessary formating (this is excel not beauty contest) - format only output data (result)
    5. you can use PivotTables (with PowerQuery or not but with Data Model) to not repeat the same results in another view with formulas on next sheets
    6. buy new machine eg. CRAY
    7. and much more - Depending on how much data you have and how organized they are, how much RAM, processor .... etc etc

    this is theory
    Last edited by sandy666; 07-23-2017 at 11:17 PM.

  5. #5
    Valued Forum Contributor
    Join Date
    04-27-2015
    Location
    Abu Dhabi, U.A.E
    MS-Off Ver
    Office 365 | 2016
    Posts
    696

    Re: Sum cell colors in a column without Macros?

    It's not possible without VBA. If you can insert a helper column, it will be easy for you.
    Enter the name of color in the helper column, hide it if you or change the font color to white for a better appearance. Use sumif function, for e.g. : SUMIF(B1:B6,"Yellow",A1:A6)

  6. #6
    Forum Contributor Brian.Aerojet's Avatar
    Join Date
    03-25-2017
    Location
    TN-USA
    MS-Off Ver
    2016 365
    Posts
    173

    Re: Sum cell colors in a column without Macros?

    Sandy,

    I would like to try to build the database on SQL Sever, but don't know a lot about it

    Can you by chance give me the steps for accessing the SQL Server? Im sure I will need to buy something to access this server

    I own a macbook pro, so I have 2016 Office for Mac

    Thanks,
    Brian

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Sum cell colors in a column without Macros?


    It was joke (almost) with SQL but it's possible.
    I suggest you as a home user (or maybe you are not) try to build a database in Excel or Access. You are just learning a bit. You have not said how much of this data is, what is the file size, and so on, so it is hard for me to write anything wise.
    I do not know about Macintosh so I will not help you with that.

    Maybe it will help: How to...

  8. #8
    Forum Contributor Brian.Aerojet's Avatar
    Join Date
    03-25-2017
    Location
    TN-USA
    MS-Off Ver
    2016 365
    Posts
    173

    Re: Sum cell colors in a column without Macros?

    I will try to make a file like mine tomorrow to upload so you can see what Im dealing with.

    I've had great help from others on this forum, I do try to work out formulas for myself before going to ask for help, I figure I can learn easier by trying it myself first

    Thanks,
    Brian

  9. #9
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Sum cell colors in a column without Macros?

    I think basic problem is solved (1st post)

    Next problem - next thread

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Sum cell colors in a column without Macros?

    How is the color being applied? If there is some logic to it, we could probable use that same logic, in a SUMIFS(). If the color is just added manually, and you are against VBA, then I think you are SOL
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  11. #11
    Forum Contributor Brian.Aerojet's Avatar
    Join Date
    03-25-2017
    Location
    TN-USA
    MS-Off Ver
    2016 365
    Posts
    173

    Re: Sum cell colors in a column without Macros?

    Here is a very small copy of one of my excel sheets, If you need more info, just let me know

    I explained what Im trying to achieve in a notes section on the excel sheet.

    Thanks,
    Brian
    Attached Files Attached Files

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Sum cell colors in a column without Macros?

    Ok, I'll try...
    First, you need VBA. Of course you can use Conditional Formatting if there is any logic (like Ford said) but if the range of your data is very big it will really slows down your Excel.
    I tried to find any logic to use a formula but no success. Why F1 is brown and next F5 is white - B1 and B5 has 3 digits and they are yellow?
    If you want to play with colors => VBA
    If you want play with formulas - you should define "what and why"

    with my logic:
    =SUMIF(B1:B36,">=100",F1:F37) - result 4
    with your logic - result 0

    I assume your data is big, so
    - VBA is light and fast (I wonder how I could say that if I do not like vba )
    - Formula(s) (logic is required): slows down excel
    - conditional formatting and formulas - slows down excel much more
    ---
    also read here: thread 194075
    Last edited by sandy666; 07-26-2017 at 02:15 AM.

  13. #13
    Forum Contributor Brian.Aerojet's Avatar
    Join Date
    03-25-2017
    Location
    TN-USA
    MS-Off Ver
    2016 365
    Posts
    173
    [QUOTE=FDibbins;4705367]How is the color being applied? If there is some logic to it, we could probable use that same logic, in a SUMIFS(). If the color is just added manually, and you are against VBA, then I think you are SOL [/QUOTE

    Do you have any suggestions after seeing my attachment file Ford?

    Thanks Brian

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,959

    Re: Sum cell colors in a column without Macros?

    What a colour scheme. They're still there, but they were so sore on the eyes, I moved them off to the right!!

    1. Assemble a coherent (1 row per set) data arrangement. Use this formula in F5, copied across and down:

    =OFFSET(OFFSET($B$1,4*(ROWS(F$5:F5)-1),,,),INT((COLUMNS($G:G)-1)/2),MOD((COLUMNS($G:G)-1),2),,)

    Each column contains ALL the values for each shading (but NOT in the same order as you showed).


    2. Identify the "matched numbers" (ie red text on white background) in G16, copied across and down:

    =IF(ISNUMBER(SEARCH(ABS(G5),$F5)),G5,0)

    3. identify the coloured cells in G28, copied across and down:

    =IF(G16=0,G5,0)
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  15. #15
    Forum Contributor Brian.Aerojet's Avatar
    Join Date
    03-25-2017
    Location
    TN-USA
    MS-Off Ver
    2016 365
    Posts
    173
    Quote Originally Posted by Glenn Kennedy View Post
    What a colour scheme. They're still there, but they were so sore on the eyes, I moved them off to the right!!

    1. Assemble a coherent (1 row per set) data arrangement. Use this formula in F5, copied across and down:

    =OFFSET(OFFSET($B$1,4*(ROWS(F$5:F5)-1),,,),INT((COLUMNS($G:G)-1)/2),MOD((COLUMNS($G:G)-1),2),,)

    Each column contains ALL the values for each shading (but NOT in the same order as you showed).


    2. Identify the "matched numbers" (ie red text on white background) in G16, copied across and down:

    =IF(ISNUMBER(SEARCH(ABS(G5),$F5)),G5,0)

    3. identify the coloured cells in G28, copied across and down:

    =IF(G16=0,G5,0)

    Thank you Glenn, I will try it when I get home this evening

  16. #16
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Sum cell colors in a column without Macros?

    maybe something like this one (idea only)
    Attached Files Attached Files

  17. #17
    Forum Contributor Brian.Aerojet's Avatar
    Join Date
    03-25-2017
    Location
    TN-USA
    MS-Off Ver
    2016 365
    Posts
    173

    Re: Sum cell colors in a column without Macros?

    Great job sandy,

    Only one thing missing that I seen, I don't think you will have any problem figuring it out after what I seen with the part you have already completed

    It just blows my mind how good some of you are on this forum in excel. I would love to know just half of what you all know.

    Ok, back to business.

    Look back at my original Attached File and you will notice the Columns F Through L.

    I noticed you took out the numbers with white background and red font to get the sum in N1, O1, P1, Q1, R1, S1, and T1 which is perfect, no problem with this at all.

    If you have to create another 7 columns like you did on your sheet back to that is fine, My goal is 2 different things. One of them you have got completed already, and the other is what I need next.

    I used your sheet to try it myself with no luck.

    The problem I had was anything I tried to do would take the numbers completely out of column S for some reason, I tried to just insert a column and again it took the numbers out of column S and made Z1 goto zero.
    But what I would like to get is the exact same thing you did, except, don't take out the numbers in white background and red font for each set of numbers, but do take out the other numbers for each set.

    What this will do is let me sum each column just like you did, but this time it will be only the white background and red font numbers.

    You can just place the sum for the white background and red font numbers right below the other ones you did, or create another set of columns if you need to, it will be good

    I think in your excel sheet back to me, you had T1, U1, V1, W1, X1, Y1 and Z1, so you can put the sum of each column with the white background and red font in T2, U2, V2, W2, X2, Y2 and Z2, or in another set of columns like I mentioned above.

    Thanks again for your help,
    Brian

    P.S. Great Review coming for you from me
    Last edited by Brian.Aerojet; 07-28-2017 at 11:03 PM.

  18. #18
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,959

    Re: Sum cell colors in a column without Macros?

    Did you check the results in the sheet (macro-free, as requested) that I supplied? It produces the same result as sandy's (G37-M37) and also adds up the white text/red background (G25-M25)!!

  19. #19
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Sum cell colors in a column without Macros?

    with white
    like I said above, this is idea only, you should define all colors (hardcoded) so formula would be more flexible

    (but if you want without VBA take a look on Glenn's solution)
    Attached Files Attached Files
    Last edited by sandy666; 07-29-2017 at 07:36 AM.

  20. #20
    Forum Contributor Brian.Aerojet's Avatar
    Join Date
    03-25-2017
    Location
    TN-USA
    MS-Off Ver
    2016 365
    Posts
    173

    Re: Sum cell colors in a column without Macros?

    Im sorry Glenn,

    I got covered up after you posted solution for me.

    I had some other projects I have been working on.

    Its no excuse, I seen where I replied to you saying I would try it when I got home.

    Im working with it right now, hopefully I can get it in my excel workbook tonight and be able to reply to you.

    If I don't get it tonight, I will definitely get it tomorrow night.

    Also, I will make sure to give you a great review once Im able to show post as Solved.

    I need so much help with my workbook that I will need to get more in depth with this forum. It will make my excel sheets so much better

    Thanks Again Glenn

    Brian

  21. #21
    Forum Contributor Brian.Aerojet's Avatar
    Join Date
    03-25-2017
    Location
    TN-USA
    MS-Off Ver
    2016 365
    Posts
    173

    Re: Sum cell colors in a column without Macros?

    Hey Glenn,

    I finally got around to working with this on my workbook that you sent me.

    It worked great

    I do have one question

    How can I make each set numbers results skip 3 rows before next set of numbers result?

    This would keep my results at same row number as my 3 digit number that is yellow background.

    I know I would have to use copy and paste, but that is fine, I would like to keep them separated if possible.

    Thanks,
    Brian
    Brian

  22. #22
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,959

    Re: Sum cell colors in a column without Macros?

    Like this, maybe?
    Attached Files Attached Files

  23. #23
    Forum Contributor Brian.Aerojet's Avatar
    Join Date
    03-25-2017
    Location
    TN-USA
    MS-Off Ver
    2016 365
    Posts
    173
    Quote Originally Posted by Glenn Kennedy View Post
    Like this, maybe?
    Perfect Glenn

  24. #24
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,959

    Re: Sum cell colors in a column without Macros?

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  25. #25
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,959

    Re: Sum cell colors in a column without Macros?

    I was asked:

    Hey Glenn,

    Thank You for helping me with my formula.

    Im trying to learn as much as possible in Excel.
    (Self-taught mostly from Guru's like you)

    I did not know what to do about this since I already showed my thread as solved.

    I was just wondering if you time, could you send me what I would add to the formula you gave me below if I want it to only show numbers 0-9 in results section for the White Background and Red Text? It doesn't matter if they are neg or pos numbers as long as they are not 10 or above

    =IF(O2="","",IF(ISNUMBER(SEARCH(ABS(G2),$F2)),G2,0))

    See sheet.

    I changed B2 to 90; which would then be picked up by the formula in Q2.

    So.. Slight mods to all 3 formula (2 to correct a non-crucial mistake and 1 to take account of the additional requirement.

    G2:
    =IF($F2="","",OFFSET($B2,INT((COLUMNS($G:H)-1)/2),MOD((COLUMNS($G:H)-1),2),,))

    P2:
    =IF($O2="","",IF(AND(ABS(G2)<10,ISNUMBER(SEARCH(ABS(G2),$F2))),G2,0))

    Y2:
    =IF($X2="","",IF(ABS(P2)=0,G2,0))
    Attached Files Attached Files

  26. #26
    Forum Contributor Brian.Aerojet's Avatar
    Join Date
    03-25-2017
    Location
    TN-USA
    MS-Off Ver
    2016 365
    Posts
    173

    Re: Sum cell colors in a column without Macros?

    Hey Glenn,

    Thank You for helping me with my formula.

    Im trying to learn as much as possible in Excel.
    (Self-taught mostly from Guru's like you)

    I did not know what to do about this since I already showed my thread as solved.

    I was just wondering if you time, could you send me what I would add to the formula you gave me below if I want it to only show numbers 0-9 in results section for the White Background and Red Text? It doesn't matter if they are neg or pos numbers as long as they are not 10 or above

    =IF(O2="","",IF(ISNUMBER(SEARCH(ABS(G2),$F2)),G2,0))

    Thanks Brian

  27. #27
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,959

    Re: Sum cell colors in a column without Macros?

    Brian, I have just repled, milliseconds before you posted!!

  28. #28
    Forum Contributor Brian.Aerojet's Avatar
    Join Date
    03-25-2017
    Location
    TN-USA
    MS-Off Ver
    2016 365
    Posts
    173

    Re: Sum cell colors in a column without Macros?

    Thanks Glenn, sorry I reposted the original message by accident

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA code to change Excel chart bar colors as per cell colors
    By mchilapur in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-21-2016, 03:29 AM
  2. Changing cells and column chart colors based on cell colors
    By HDeuce in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-03-2016, 11:43 AM
  3. [SOLVED] Compare cell colors in column and update color in another cell
    By drewship in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-05-2016, 10:08 AM
  4. Replies: 16
    Last Post: 12-12-2014, 06:19 AM
  5. Replies: 1
    Last Post: 08-01-2014, 10:33 AM
  6. Background color of cell based on colors in column
    By mez275 in forum Excel General
    Replies: 1
    Last Post: 09-28-2013, 05:06 PM
  7. Excel or Macros to Update Colors of Cell using Live Calender options
    By pupadhya in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-29-2013, 05:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1