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.

Como descontar un stock de una hoja a otra?

publicado

hola que tal lo que pasa es que tengo una plantilla de punto de venta y todo iva bien pero cuando registre muchos productos se descontavan pero no el producto con el codigo necesito una funcion o macro para descontar el producto esta es mi plantilla espero y me puedan ayudar esta es la funcion.

Sub Guardar_ventas()

Range("Información!C" & Range("R6")).Value = Range("Información!C" & Range("R6")) - Range("G7")

Sheets("Resultados").Visible = True

Sheets("Resultados").Select

Range("A2").Select

Do While ActiveCell.Value <> ""

ActiveCell.Offset(1, 0).Select

Loop

ActiveCell.Offset(0, 0).Value = Range("Ventas!l1")

ActiveCell.Offset(0, 1).Value = Range("Ventas!l2")

ActiveCell.Offset(0, 2).Value = Range("Ventas!l3")

ActiveCell.Offset(0, 3).Value = Range("Ventas!i1")

ActiveCell.Offset(0, 4).Value = Range("Ventas!E7")

ActiveCell.Offset(0, 5).Value = Range("Ventas!f7")

ActiveCell.Offset(0, 6).Value = Range("Ventas!g7")

ActiveCell.Offset(0, 7).Value = Range("Ventas!h7")

ActiveCell.Offset(0, 8).Value = Range("Ventas!k2")

ActiveCell.Offset(0, 9).Value = Range("Ventas!f2")

Sheets("Ventas").Select

MsgBox "La información de esta venta ha sido almacenada exitosamente", vbInformation, "Venta registrada"

Sheets("Resultados").Visible = False

Sheets("Factura").Visible = True

Sheets("Factura").Select

Range("A6").Select

Do While ActiveCell.Value <> ""

ActiveCell.Offset(1, 0).Select

Loop

ActiveCell.Offset(0, 0).Value = Range("Ventas!f7")

ActiveCell.Offset(0, 1).Value = Range("Ventas!g7")

ActiveCell.Offset(0, 2).Value = Range("Ventas!h7")

Sheets("Ventas").Select

Dim intRespuesta As Integer

intRespuesta = MsgBox("Se ha añadido el articulo a la factura de ventas, ¿desea visualizar la factura?", vbQuestion + vbYesNo, "Visualización de factura")

If intRespuesta = 6 Then

Range("i1").Value = Range("i1") + 1

Sheets("Factura").Visible = True

Sheets("Factura").Select

Else

Sheets("Factura").Visible = False

MsgBox "Para continuar con la factura, agregue otro artículo"

End If

End Sub

Featured Replies

publicado
  • Autor

hola que tal si es lo que tenia pensado pero no lo puedo subir porque dice que es muy pesado, pesa 1mb

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.