Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Max y min dependiendo del color del texto de un rango

publicado

Hola Buenas tardes, necesito ayuda debo encontrar el máximo y el mínimo de un rango de datos dependiendo del color.

 

por ejemplo si el texto es de color rojo debo hallar el máximo y si el texto es azul debo hallar el mínimo dentro de un mismo rango

Featured Replies

publicado

Hola.

Prueba esta macro y adaptala a tus necesidades.

	Sub color()
Dim cel As Range
Dim rojo(100)
Dim azul(100)
Xr = -1
Xa = -1
For Each cel In Range("A1:A7")
If cel.Font.ColorIndex = 3 Then
Xr = Xr + 1
rojo(Xr) = cel
End If
If cel.Font.ColorIndex = 5 Then
Xa = Xa + 1
azul(Xa) = cel
End If
Next
MsgBox "Maximo " & Application.WorksheetFunction.Max(rojo)
MsgBox "Minimo " & Application.WorksheetFunction.Min(azul)
	End Sub
	

Un saludo.

publicado
  • Autor

Gracias por el macro la pregunta es como descarto el 0 en los mínimos y estos mínimos y máximos tan bien se deben evaluar en las filas y las columnas, osea se debe colocar el valor al final del rango tanto por fila como por columna, gracias

 

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.