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.

copiar celdas especificas de un libro a otro con una condicion

publicado

Buena tarde,  amigos del Foro ..

alguien que me pueda  asesorar sobre un código a traves de una  macro que  me permita concatenar  los   varias celdas con   caracteres siempre y cuando se cumpla  una condición con otras celdas con números.

es decir si el   las celdas de G51:G54, tienen  valor numérico   concatene  la cadena de caracteres  que tenga H1:H54, del  archivo RO_SECHU  a CONTROLROSECHU,

 

Sub CopiarCeldas()
   Dim Orig, Dest, i&, uf&
   Dim wbDest As Workbook
   Dim wsOrigen As Worksheet, wsDest As Worksheet
   
   Application.ScreenUpdating = False
   Orig = Array("A37", "D5", "D7", "D17", "A23", "I13", "I15")
   Dest = Array("K", "A", "E", "H", "J", "I", "G")
   
   Set wsOrigen = Worksheets("RO_SECHU")
   Set wbDest = Workbooks.Open(ThisWorkbook.Path & "\CONTROLROSECHU.xlsx")
   Set wsDest = wbDest.Sheets("Reporte_Diario")
   
   uf = wsDest.Range("A" & Rows.Count).End(xlUp).Row + 1
   For i = 0 To UBound(Orig)
      wsDest.Range(Dest(i) & uf) = wsOrigen.Range(Orig(i))
   Next i
   
   wsDest.Range("M" & uf) = Application.Sum(wsOrigen.Range("G51:G54"))
   
   wbDest.Close True
   Set wsOrigen = Nothing: Set wbDest = Nothing: Set wsDest = Nothing
   Erase Orig, Dest
   Application.ScreenUpdating = True
End Sub
 

 

 

RO_SECHU.xlsm

CONTROLROSECHU.xlsx

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.