Consulting

Results 1 to 19 of 19

Thread: conditional formatting to be macro on specific rows and colums

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #17
    snb
    Guest
    Sub M_snb()
      sn = Sheet1.Cells(10, 1).Resize(, 35)
      
      ReDim sp(7)
      For j = 0 To 7
        sp(j) = Sheet1.Cells(11, 36 + j).Interior.Color
      Next
      
      For j = 2 To UBound(sn, 2) Step 3
        If sn(1, j) > sn(1, 1) Then Sheet1.Cells(10, j).Interior.Color = sp((sn(1, j) - sn(1, 1)) \ 100 - 1)
      Next
    End Sub
    for all sheets:

    Sub M_snb()
      ReDim sp(7)
      For j = 0 To 7
        sp(j) = Sheet1.Cells(11, 36 + j).Interior.Color
      Next
      
      For Each it In Sheets
        sn = it.Cells(10, 1).Resize(, 35)
      
        For j = 2 To UBound(sn, 2) Step 3
           If sn(1, j) > sn(1, 1) Then it.Cells(10, j).Interior.Color = sp((sn(1, j) - sn(1, 1)) \ 100 - 1)
        Next
      Next
    End Sub
    Last edited by snb; 05-21-2024 at 07:06 AM.

Tags for this Thread

Posting Permissions

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