Vba code to highlight conditional formatting

Goalexcel

Board Regular
Joined
Dec 28, 2020
Messages
101
Office Version
  1. 2016
Platform
  1. Windows
Hello Expert Group for your excellent assistance.
I would like to ask for your kindly help in this task.
Step 1:
When select Column A= count 11 or 16 rows, (will never exact count amount to group Column A), and will assign a number in column B, creating a group.
1636001101660.png

I have to create 8 sheets with different number column A & B, never the same amount of sheets
I am doing manually, I am looking for a VBA code to automate the process.
I found conditional formatting but take time from 1 to 99 colors , every week change the excel files with new data.

The second step2 : All sheet1 until sheet8. Never will be the same sheets. Need to copy in one new sheet. Only column A.
Every sheet will be add below the previous group.
1636002598693.png
 

Attachments

  • 1636002202158.png
    1636002202158.png
    20 KB · Views: 4

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hello Expert,
Please kindly help to modify the below code, to apply to my range, for even , odd number color yellow, blue, for more even+2 or odd+2 green light brown,
Color apply in column A.

Sub ColorCell()

Dim cell As Range

For Each cell In Range("A1", "A100")
If Not cell = "" Then
If cell.Value Mod (2) = 0 Then
cell.Interior.ColorIndex = 10
Else
cell.Interior.ColorIndex = 3
End If
End If
Next

End Sub
 
Upvote 0

Forum statistics

Threads
1,213,562
Messages
6,114,326
Members
448,564
Latest member
ED38

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top