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.

hacer una macro para cuando pulse una celda el valor de ella se utilice en le macro para que complete la direccion web

publicado

buenas

Me llamo franespi y soy nuevo por ello os doy un saludo

Bueno vamos a lo que vamos 

tengo una hoja excel , en la primera columna tengo introducidos unos nombres , y tengo tambien una macro

que cuando pulso cualquier celda de la primera columna pues se tiene que cojer el valor de la celda con la macro y completar con una variable en la mitad de una 

direccion web , el problema esta en que no conozco la sintaxis de introducir una variable en la direccion web

podria alguien ayudarme .

os incluyo la macro

Option Explicit

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
 Dim CeldaActual As String
   Dim valor As String
   
    CeldaActual = ActiveCell.Address
    valor = Range(CeldaActual).Value


    'Si se elige una celda entre el rango A10:A17
    If Not Intersect(Target, Range("A2:A100")) Is Nothing Then
    
        'Se muestra un mensaje indicando la celda elegida
       ' MsgBox "Has seleccionado la celda " & valor, vbInformation, "EXCELeINFO"


    ActiveWorkbook.FollowHyperlink Address:="http://blancas.paginasamarillas.es/jsp/resultados.jsp?no=valor.value&sec=17&lo=Torroella%20de%20Montgri&pgpv=1&tbus=0&nomprov=Girona&idioma=spa"
   
    End If
End Sub
 

las letras rojas es lo que esta mal

o

Featured Replies

publicado

Hola @Franespi

Intenta probar así:

Option Explicit

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
 Dim CeldaActual As String
   Dim valor As String
   
    CeldaActual = ActiveCell.Address
    valor = Range(CeldaActual).Value

    If Not Intersect(Target, Range("A2:A100")) Is Nothing Then
        ActiveWorkbook.FollowHyperlink Address:= _
        "http://blancas.paginasamarillas.es/jsp/resultados.jsp?no=" _
        & valor & "sec=17&lo=Torroella%20de%20Montgri&pgpv=1&tbus=0&nomprov=Girona&idioma=spa"
   
    End If
End Sub

Nos Comentas.Ayuda_1.1.xlsb

 

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.