Consulting

Page 3 of 3 FirstFirst 1 2 3
Results 41 to 47 of 47

Thread: Color rows according to a specific column and a specific cell

  1. #41
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,896
    Location
    Now I'm confused -- in ver 013 I changed to the array you asked for in post #36. Every thing else should be the same

    All you need to do is manually maintain the array

        aryWorksheets = Array("Blagoevgrad total", "Burgas total", "Varna total", _
            "Veliko Tyrnovo total", "Vidin total", "Vraca total", "Gabrovo total", _
            "Dobrich total", "Kyrdjali total", "Kustendil total", "Lovech total", _
            "Montana total", "Pazardjik total", "Pernik total", "Pleven total", "Plovdiv total", _
            "Razgrad total", "Ruse total", "Silistra total", "Sliven total", "Smolqn total", _
            "Sofia total", "Sofia oblast total", "Stara Zagora total", "Tyrgovishte total", _
            "Haskovo total", "Shumen total", "Qmbol total")
            
        For iWS = LBound(aryWorksheets) To UBound(aryWorksheets)
            Call DoAllRows(Worksheets(aryWorksheets(iWS)))
        Next
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  2. #42
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    288
    Location
    Hi Paul, I think we've been diverging in writing since yesterday.
    I tried to log in to the site several times and it kept giving me some errors that it couldn't log in.
    I wrote, wrote and when I pressed the send button several times it threw me out with the described problem.
    And apparently while I was writing, you had already sent it (somehow), and I hadn't seen it and there was total confusion.
    I'm downloading the file now and I'll see it.
    I hope I can send now - what I wrote.
    Greetings and I'll reply back.

  3. #43
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    288
    Location
    Hi Paul,
    I finally managed to access the site. I don't know what the reason is, maybe there was some problem with it.
    Now that I'm inside, I immediately reply that with the latest version everything is fine and works great.
    Thank you with all my heart for this help from your side.
    I'm marking the topic as solved.
    I wish you endless health and be always so dedicated and helpful to us ignorant people who can't cope with a given task.
    See you soon Paul

  4. #44
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,896
    Location
    Yea, the forum has been having some problems lately

    Glad you got what you needed
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  5. #45
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    288
    Location
    Hello Paul_Hossler,
    I'm very sorry to write again, as I thought everything was fine with the macro.
    This week I added a new product to my table and when I pressed the button to color it according to the sums in the cells, I caught an error that I don't know how it happens.
    Then I opened the table you sent, in which everything worked in the tests, but today I decided to do a test and saw that the same error occurs in it too.
    The strangest thing is that in some rows and selected cells, when I mark the color, it calculates as it should, and in others it doesn't, but I'm noticing that now.
    I'll attach your table and describe where I see the error:
    So on row 5(ES), 8(EU) and 10(EU) - I colored them and from there it starts searching and calculating which cell should be in what color - that's correct and correct.
    However, line 25 and (ET 25) is the color and from there it should start coloring after it. I do the test with my numbers, for example, there are 82 pieces and it should turn yellow, and it does it as a blue color as if it were the second color, and it shouldn't be like that, it should be yellow and then color them in the next colors. The same case is with line 54 and 56, 79th too. I have no idea why it drops the first color in certain places and starts from the second and continues with the next colors.


    I really ask for some help, why this confusion occurs, somewhere to be correct, somewhere to skip.


    Thank you very much!
    Attached Files Attached Files

  6. #46
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,896
    Location
    See if this one is better
    Attached Files Attached Files
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  7. #47
    VBAX Tutor
    Joined
    Sep 2012
    Location
    London
    Posts
    288
    Location
    Hello Paul_Hossler,
    I downloaded the file and I see that it worked for you, but it gives me an error (I show a picture with something that says C=150)
    I have no idea where it comes from or why.......
    2025-11-17_135842.jpg
    Attached Images Attached Images
    Last edited by k0st4din; Today at 05:29 AM.

Posting Permissions

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