Numeración por color

ColdGeorge

Active Member
Joined
Aug 21, 2012
Messages
407
Office Version
  1. 2016
Platform
  1. Windows
Buenos días

En el rango B3:B43 tengo una lista de nombres, algunos de ellos están en rojo (font, color).

Solicito ayuda para crear en la columna A la numeración necesaria (1,2, 3, etc.) para los los nombres en B que están en rojo.

Gracias por su ayuda, ColdGeorge
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Buenos Dias,

Lo mas facil es de usar la misma lógica para determinar las celdas en rojo ...para la numeración ...
 
Upvote 0
Hola amigos

Estoy experimentando con este código:

Code:
Dim cell As Range
For Each cell In Sheets("literaturapuntual").Range("B3:B44")
If cell.Font.Color = vbRed Then
cell.Offset(0, -1).Value = 1
End If
Next cell

Pero no numera en la columna A los registros que están con letras rojas en la columna B.

Gracias de antemano, ColdGeorge.
 
Upvote 0
Hola,

Con una pequeña modificacion ...

Code:
Sub RojoNum()
Dim cell As Range
Dim i As Integer
  For Each cell In Sheets("literaturapuntual").Range("B3:B44")
    If cell.Font.Color = vbRed Then
        i = i + 1
        cell.Offset(0, -1).Value = i
    End If
  Next cell
End Sub

Espero que ajude ... :wink:
 
Upvote 0
Hola James006

Gracias, con tu ayuda pude alcanzar mi objetivo, y aprender algo nuevo, saludos.

ColdGeorge
 
Upvote 0

Forum statistics

Threads
1,214,430
Messages
6,119,453
Members
448,898
Latest member
drewmorgan128

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