Results 1 to 20 of 44

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

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,888
    Location
    What about the rest of the number, P5, P6, etc. that were not grey?

    So

    1. Check each cell in P3:AA37 (e.g. S5)

    Using row 5 as example

    P5 = 1, Q5 is blank so no color for P5

    Q5 is blank, but R5 = 3 so no color for Q5 since 3 < AB5 - 1

    R5 = 3, but S5 is blank so no color for R5

    S5 is blank, but T5 = 2 so no color for S5 since 3 < AB5 - 1

    T5 = 2, but U5 is blank so no color for T5


    What do you mean accumlated?


    These cells in row 1 are blank in your example. How do the factor in?

            If .Cells(1, 157).Value = 0 Then Exit Sub    '   no threshholds 15ti red e pyrviqt bonus ili kolonata s godinata 2023(EA) naprimer    
            T0 = .Cells(1, 117).Value 'DM KOLONA ILI SRAVNENIETO SPRQMO 1.12.2022    
            T1 = .Cells(1, 157).Value 'tezi 131, 132, 133, 134 ili EA, EB, EC, ED sa bonusite +30,+60,+90,+120 naprimer
            T2 = .Cells(1, 158).Value
            T3 = .Cells(1, 159).Value
            T4 = .Cells(1, 160).Value
            T5 = .Cells(1, 161).Value 'new color
            T6 = .Cells(1, 162).Value 'new color
            T7 = .Cells(1, 163).Value 'new color
            T8 = .Cells(1, 164).Value 'new color
            T9 = .Cells(1, 165).Value 'new color
            T10 = .Cells(1, 166).Value 'new color
    Last edited by Aussiebear; 07-03-2025 at 03:52 AM.
    ---------------------------------------------------------------------------------------------------------------------

    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

Posting Permissions

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