Vba code to highlight conditional formatting

Goalexcel

Board Regular
Joined
Dec 28, 2020
Messages
95
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: 2

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Goalexcel

Board Regular
Joined
Dec 28, 2020
Messages
95
Office Version
  1. 2016
Platform
  1. Windows
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,403
Messages
5,769,872
Members
425,576
Latest member
niall54321

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
Top