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.

Ayuda-consulta macro en vb

publicado

Hola ante todo, muchas gracias por permitir mi ingreso al foro.

Tengo un ejercicio q no logro resolver y quisiera ver si pueden ayudarme. El ejercicio dice: "Realizar una macro que ingrese dos números en dos celdas que de el usuario y por ultimo dejar el máximo en una celda tambien ingresada por el usuario"

En visual basic escribi:

Sub Macro1()

'

' Macro1 Macro

'

' Acceso directo: CTRL+j

'

Dim Numero1 As String

Numero1 = InputBox("Ingrese Numero1", "Datos")

ActiveSheet.Range("H1").Value = Numero1

Dim Numero2 As String

Numero2 = InputBox("Ingrese Numero2", "Datos")

ActiveSheet.Range("H2").Value = Numero2

End Sub

Hasta ahi logro ingresar los dos numeros, pero no se como dejar el maximo en una celda ingresada por el usuario. Quisiera que me ayuden, se los agradeceria. Gracias

Featured Replies

publicado

pues haces una comparación:

IF val(Numero1) > val(Numero2) Then
ceda = Numero1
else
celda = Numero2
end if[/CODE]

donde celda es la celda donde quieres colocar el máximo, suerte

publicado
  • Autor

Gracias por la rápida respuesta, lo intentare como dices. Saludos.

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.