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 formulas en el codigo que ya tengo.

publicado

Hola que tal, tengo un inconveniente cuando mi codigo trabaja, al momento que hace la copia a las otras hojas nuevas, solo copia datos, lo que yo quisiera es que copie las formulas y no solo los datos.

Sub ExtractRepsAA()
Dim ws1 As Worksheet
Dim wsNew As Worksheet
Dim rng As Range
Dim r As Integer
Dim c As Range
Set ws1 = Sheets("MENSUAL")
Set rng = Range("Database")

'extract a list of Sales Reps
ws1.Columns("A:A").AdvancedFilter _
Action:=xlFilterCopy, _
CopyToRange:=Range("AU1"), Unique:=True
r = Cells(Rows.Count, "AU").End(xlUp).Row

'set up Criteria Area
Range("AW1").Value = Range("A1").Value

For Each c In Range("AU2:AU" & r)
'add the rep name to the criteria area
ws1.Range("AW2").Value = c.Value
'add new sheet and run advanced filter
Set wsNew = Sheets.Add
wsNew.Move After:=Worksheets(Worksheets.Count)
wsNew.Name = c.Value
rng.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("MENSUAL").Range("AW1:AW2"), _
CopyToRange:=wsNew.Range("A1"), _
Unique:=False
ws1.Range("K2").Copy
wsNew.Range("K2").PasteSpecial
ws1.Range("A1").CurrentRegion.EntireColumn.Copy
Range("A1").CurrentRegion.EntireColumn.PasteSpecial (xlPasteColumnWidths)
wsNew.Range("A1").CurrentRegion.EntireRow.AutoFit
wsNew.Range("A2").Select
ActiveWindow.FreezePanes = True
Next
ws1.Select
ws1.Columns("AU:AW").Delete
End Sub
[/CODE]

BANCO.xls

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.