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.

Control entradas y salidas macros

publicado

Hola,

Soy nuevo en macros, y encontré éste archivo de COntrol de Entradas y Salidas. Quisiera saber qué debo cambiar para que funcione la macro SIN que el "código" sea numeral NI correlativo, es decir que reconozca un código alfanumérico.

Ejemplo:

A2=TS1243X

Control Entradas y Salidas Macros.rar

Featured Replies

publicado

Hola Felipe... por lo que he visto ..... el archivo añade una cantidad a entradas o a salidas.... evidentemente "numeros"... No entiendo cual es tu pregunta o tu duda.....

publicado

Te dejo una función que incrementa cualquier valor a un numerador del tipo:

[Parte alfabética] Número [Parte alfabética] por ejemplo: AAA000123XX

Las partes alfabéticas son opcionales

Función: NewClave(Celda, Incremento)

Ejemplo de llamada a la función:

ClaveEntrada = NewClave(ActiveCell, 4)
ClaveSalida = NewClave(A2, 4)[/CODE]

[b][u]Código VBA de la función:[/u][/b]

[CODE]Function NewClave(Celda As Range, Incremento As Integer) As String
If IsNumeric(Celda.Value) Then
NewClave = Celda.Value + Incremento
Exit Function
End If
For i = 1 To Len(Celda.Value)
If IsNumeric(Mid(Celda.Value, i, 1)) = True Then Exit For
Next
For f = Len(Celda.Value) To 1 Step -1
If IsNumeric(Mid(Celda.Value, f, 1)) = True Then Exit For
Next
n = CStr(CLng(Mid(Celda.Value, i, f - i + 1)) + Incremento)
If Len(n) = f - i + 1 Then
NewClave = Left(Celda.Value, i - 1) & n & Right(Celda.Value, Len(Celda.Value) - f)
Else
NewClave = Left(Celda.Value, i - 1) & _
String(f - i + 1 - Len(n), "0") & n & Right(Celda.Value, Len(Celda.Value) - f)
End If
End Function[/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.