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.

Agregar texto en la misma celda que se modifica

publicado

Hola a todos:

¿Podrían ayudarme con esto? Ya he tratado de distintos modos sin éxito.

En la celda G7, debo atregar un folio de documento, pero a ese folio (dependiendo del mes) se le debe agregar el numero del mes y el año.

Entonces, el folio es "2457" y el mes es "02" y el año "23", por lo tanto en la celda G7 yo debo escribir "AC0223-2457"

La idea es que solo se capture el folio "2457" y que automáticamente se agrege "AC0223-"

Ya intente con una macro que agrege el texto cuando se modifique la celda, pero cuando la macro agrega el texto se está volviendo a modificar la celda y se cicla el proceso.

¿alguna idea?

Les agradezco de antemano su apoyo.

Saludos coridales

Featured Replies

publicado

Buenas, Una solución

Private Sub Worksheet_Change(ByVal Target As Range)
 If Target.Address = "$G$7" And Target <> "" And InStr(1, Target, "AC") = 0 Then
  Target = "AC" & Format(Month(Now()), "00") & Mid(Year(Now()), 3, 2) & "-" & Target
 End If
End Sub

saludos

 

publicado

No he visto tu macro, pero el ciclado lo puedes evitar poniendo Application.EnableEvents = False al principio de la macro y Application.EnableEvents = True al final.

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.