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 DATOS UNICOS SEGUN CONDICION

publicado

BUENOS DÍAS, UN CORDIAL SALUDO Y MUCHAS GRACIAS DE ANTEMANO POR SU AYUDA.

EN LA HOJA = "Proy.-Comer", TENGO DOS COLUMNAS EN AMARILLO UNA ES LA VARIEDAD Y LA OTRA ES LA RECETA, EL TEMA ES QUE LAS RECETAS SE DUPLICAN EN ALGUNOS CASO Y SEGÚN LA VARIEDAD, CREE EN EL ADMINISTRADOR DE NOMBRES,  RANGOS DE  TODAS LAS VARIEDADES;

POR EJEMPLO

"BLACK SEEDLESS" = "BS"  (RANGO ='Proy.-Comer'!$L$11:$L$20)

"COTTON CANDY" = "CC"  (RANGO ='Proy.-Comer'!$L$41:$L$55)

"CANDY SNAPS" = "CS" (RANGO ='Proy.-Comer'!$L$23:$L$38) ...--------Y ASÍ SUCESIVAMENTE

LA IDEA ES COPIAR LOS DATOS ÚNICOS DE LAS RECETAS EN LA HOJA = BD_Recetas EN EL RANGO C9:C43 (DE COLOR AMARILLO.

YO USE UNA MACRO LA CUAL ESTA EN EL MODULO2  DEL VISUAL, CADA VEZ QUE CAMBIO LA VARIEDAD EN LA HOJA = BD_Recetas CELDA EN ROJO (F1), TRATO DE OBTENER LAS INICIALES DE CADA VARIEDAD EN LA CELDA D1 , SEGÚN COMO ESTAN LOS RANGOS EN EL ADMINISTRADOR DE NOMBRES, EN LA MACRO EN LA LINEA ---    For Each Celda In Range("D1")   ---- SOLO ME COPIA LO DE LA CELDA D1, SIN EMBARGO CUANDO EN LA MISMA MACRO LE CAMBIO EN LA LINEA    ---    For Each Celda In Range("CS")   ---- SI ME COPIA LOS DATOS.

COMO PODRÍA AUTOMATIZARLO MEJOR???? SI HUBIERA ALGUNA FORMA SERIA GENIAL, ADJUNTO ARCHIVO

IMPORTANTE: "A MANERA DE PRUEBA PUSE EL RANGO AH8 PORQUE CADA VEZ QUE EJECUTO LA MACRO ME BORRABA LOS DATOS DE LAS DEMAS CELDAS DE LA COLUMNA C LA IDEA ES QUE ME COPIE EN LA CELDA C  DEL RANGO EN AMARILLO"

 

SALUDOS Y NUEVAMENTE GRACIAS POR EL APOYO

 

 

 

 

 

01 PCP.xlsx - v02 - copia.xlsm

Featured Replies

publicado

Hola @darkstars9976, prueba este código y me comentas.

Sub Copia_recetas()
    Dim Rng$, x#
    Dim rept        As Range
    Dim celda
    With Sheets("BD_Recetas")
        
        Rng = .Range("D1")
        
        x = 9
        
        For Each celda In Sheets("Proy.-Comer").Range(Rng)
            
            If celda <> "" Then
                Set rept = .Range("C9:C43").Find(celda, , , xlWhole)
                
                If rept Is Nothing Then _
                   .Cells(x, "C") = celda: x = x + 1
                
            End If
        Next
        
    End With
    
End Sub

Saludos.

publicado
  • Autor

MI ESTIMADO  @AlexanderS ES JUSTO LO QUE QUERÍA, DE VERDAD NO LO HUBIESE PODIDO HACER DE ESA MANERA TAN SIMPLE COMO TU LO HAS HECHO, Y SE ME OCURRIÓ POR AHÍ AGREGAR UNA LINEA PARA BORRAR EL CONTENIDO ANTES DE OBTENER LAS NUEVAS RECETAS......

Sub Copia_recetas()
    Dim Rng$, x#
    Dim rept        As Range
    Dim celda
    With Sheets("BD_Recetas")
       Rng = .Range("D1")
       Range("C9:C43").ClearContents   -   AGREGUE ESTA LINEA
       x = 9
       For Each celda In Sheets("Proy.-Comer").Range(Rng)
       If celda <> "" Then
                Set rept = .Range("C9:C43").Find(celda, , , xlWhole)
                If rept Is Nothing Then _
                   .Cells(x, "C") = celda: x = x + 1
                End If
        Next
    End With
End Sub

MUCHAS GRACIAS POR TU APOYO ERES UN GENIO, Y POR LA EXCELENTE LECCIÓN QUE ME HAS DADO, ESTOY HACIENDO UN LIBRO DE PRODUCCIÓN INDUSTRIAL, Y SE QUE NECESITARE DE MAS AYUDA PARA PODER CULMINARLO.

SI TENGO OTRA CONSULTA ESPERO PODER MOLESTARTE Y QUITARTE ALGO DE TIEMPO.

MILES DE GRACIAS,. Y BENDICIONES.

 

 

 

 

publicado
  • Autor

BUEN DIA MI ESTIMADO @AlexanderS molestandote de nuevo, queria saber si me puedes ayudar con este archivo:

tengo un archivo "01 PCP.xlsx - v02 - copia" el cual entre otras hojas contiene tres principalmente, y son:

"Proy.-Comer"      -       "BD_Recetas"      -      "Mat_Stock"

En la hoja "Proy.-Comer" tenemos en color naranja las semanas del año, y en color amarillo los productos, y en plomo las cantidades (que se digitan manualmente).

***Lo que necesito es que en la hoja "BD_Recetas" , a partir de la celda "M65"  Sume la cantidad correspondiente a la semana según el producto de la columna en color amarillo "L10:L193" Y sus cantidades (celdas de color plomo), y luego lo multiplique por la cantidad según corresponda de la columna "H65" y que si la celda de la columna H dice caja que lo deje en "0", y asi sucesivamente para las demás semanas  (se puede apreciar en la formula).***

En la Hoja  "Mat_Stock",  a partir de la celda "I7"

***Quiero sumar por semana la cantidad del material a utilizar, en la columna A que esta en amarillo los códigos y tiene que sumar por semana según el código de la hoja "BD_Recetas" en la columna "F" de color naranja (Se puede ver también en la formula de las celdas)***

 

esto es para tratar de automatizar lcon una macro el archivo de calculo de materiales por semana.

 

DE ANTEMANO MUCHAS GRACIAS POR LA AYUDA.

01 PCP.xlsx - v02.xlsm

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.