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.

Obtener promedios de valores positivos por medio de vba

publicado

Buenas....

necesito que me ayuden con este codigo o si hay otra mejor todavia, este es el codigo:

For X = 2 To Range("F" & Rows.Count).End(xlUp).Row + 1

Range("H" & X) = ""

Range("I" & X) = ""

Do Until Not sumaa < 5 Or Range("F" & X) = ""

sumaa = sumaa + Range("F" & X)

sumab = sumab + Range("G" & X)

X = X + 1

Loop

If Not sumaa = 5 Then Range("I" & X - 1) = "*"

Range("H" & X - 1) = sumab

sumaa = 0

sumab = 0

If Not Range("F" & X) = "" Then X = X - 1

Next

En VBA quiero que me realize lo siguiente:

en la columna F me sume hasta 5 , y que vuelva a sumar 5 hasta el final y paralelamente en la columna G me obtenga el promedio de solo los positivos, en la columna H colocar el valor del promedio de la columna G, en la cual coincida en la columna F en donde sumo 5.

ejemplo:

F G H

1 -20

1 -20

1 -20

1 -20

1 -20 0

1 -20

1 -20

1 3

1 6

1 9 6

1 3

1 6

1 1

1 0

1 6 4

no puedo resolverlo , soy nuevo en esto, por favor ayudenme :(, solo logro sumar no mas .......

Muchas Gracias , aqui le dejo mi archivo

Probando.rar

Featured Replies

No hay posts para mostrar

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.