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.

macro para repartir cantidades en diferentes columnas

publicado

Buenas tardes a Tod@s

como explico mas en detalle en el archiuvo que adjunto me giustaria que quedara como en el ejemplo

Gracias por vuestra colaboracion

prueba.xls

Featured Replies

publicado

Hola:

Pues ha sido mas complicado de lo que parecía a simple vista:

Sub RepartirImportePorMuelle()

Dim Muelles() As Variant, Índice As Integer
Dim Importe As Currency, Celda As Range


Range("V2:AA" & Range("A" & Rows.Count).End(xlUp).Row).ClearContents


For x = 2 To Range("A" & Rows.Count).End(xlUp).Row
If Not Left(Range("B" & x), 6) = "Cuenta" Then
ReDim Preserve Muelles(Índice)
Muelles(Índice) = Left(Range("O" & x), 3)
Índice = Índice + 1
Else
If Range("T" & x) <> "" Then
Importe = Range("T" & x) / Range("O" & x)
Debug.Print Importe; UBound(Muelles); Range("O" & x)
For m = 0 To UBound(Muelles)
For Each Celda In Range("V1:AA1")
If Muelles(m) = Trim(Celda.Value) Then
Cells(x, Celda.Column) = Cells(x, Celda.Column) _
+ Importe
Exit For
End If
Next
Next
End If
Índice = 0
End If
Next


End Sub

Saludos


[/CODE]

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.