Want to create a chronological row then reset based on font color

0 votes

I want to make a column that, based on the column to its left and the colour of the font, numbers itself chronologically. I would then like it to reset and start numbering the rows again when a new font colour arrives in the column. Basically, make a line item column.

I discovered a code, but it wasn't the one I required.

enter image description here

I tried other codes but nothing I found worked.

Feb 2, 2023 in Others by Kithuzzz
• 38,010 points
181 views

1 answer to this question.

0 votes

Use this function to test the font color:

Option Explicit
Function TextColour(RG As Range)
    Application.Volatile
    TextColour = RG.Font.Color
End Function

Then use it like this:

EUsage

Example:

enter image description here

answered Feb 2, 2023 by narikkadan
• 63,420 points

Related Questions In Others

0 votes
1 answer

VBA Loop to select then copy a range of cells based on value in column B

Try this: Sub Macro2() Dim ...READ MORE

answered Mar 23, 2023 in Others by narikkadan
• 63,420 points
1,534 views
0 votes
0 answers

Write a DAX query to obtain the bottom 5 customers based on the order price

Jan 22, 2020 in Others by anonymous
• 170 points
296 views
0 votes
1 answer

Retrieve epay.info Balance with VBA and Excel

This code should log you in, provided ...READ MORE

answered Sep 5, 2018 in Blockchain by digger
• 26,740 points
833 views
0 votes
1 answer

How to load file to Excel Power query from SFTP site

Currently, I don't think there is a ...READ MORE

answered Dec 3, 2018 in Power BI by Upasana
• 8,620 points
3,132 views
0 votes
1 answer

Using VBA Excel to create a gramatically correct list

The Excel AND function is a logical ...READ MORE

answered Feb 9, 2022 in Others by gaurav
• 23,260 points
430 views
0 votes
2 answers

How to copy a formula horizontally within a table using Excel VBA?

Hi so basically, create an adjacent column ...READ MORE

answered Feb 16, 2022 in Others by Edureka
• 13,670 points
692 views
0 votes
1 answer

In a excel formula I need to create a list of names on one sheet based upon criteria/data of another sheet

The final formula is: =IF(ROWS($H$3:H3)<=$I$1,INDEX(Personnel! ...READ MORE

answered Nov 25, 2022 in Others by narikkadan
• 63,420 points
675 views
0 votes
1 answer

How do I get it to select a single row based on the value?

Try this: Sub MoveBasedOnValue2() Dim ...READ MORE

answered Jan 20, 2023 in Others by narikkadan
• 63,420 points
324 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP