Comparar tres celdas de texto

Pelfort

New Member
Joined
Mar 22, 2019
Messages
1
'Escoger valor celda para borrar fotos e ir insertando segun correspondaPrivate Sub worksheet_change(ByVal target As Range)
If target.Cells.Count > 1 Then Exit Sub
If IsNumeric(target) And target.Address = "$L$9" Then
If Range("P7").Value = "3" Then
Select Case target.Value
Case 1: macro1
End Select
End If
If Range("P8").Value = "6" Then
Select Case target.Value
Case 2: Macro2
End Select
End If
If Range("P9").Value = "9" Then
Select Case target.Value
Case 3: Macro3
End Select
End If

Hola, soy nuevo aquí mando una parte de esta macro, que luego continua, si en la celda L9 entro un numero, funciona correctamente, automáticamente, pero deseo que en vez de número poner texto, un nombre y no funciona, lo he probado de mil maneras, haciendo cambios haciéndolo por macros bajadas de foros etc como debo hacer para que me funcione con texto? a veces lo he probado con formulas pero si el número viene de una formula no fuciona si el número lo pongo yo, si, gracias
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hola,

A mi me parece que la solucion deberia ser lo siguiente :

Code:
Private Sub Worksheet_Change(ByVal Target As Range)


If Target.Cells.Count > 1 Then Exit Sub
If Target.Address <> "$L$9" Then Exit Sub


If Range("P7").Value = "3" Then Application.Run ("Macro1")
If Range("P8").Value = "6" Then Application.Run ("Macro2")
If Range("P9").Value = "9" Then Application.Run ("Macro3")


End Sub
 
Upvote 0

Forum statistics

Threads
1,214,416
Messages
6,119,384
Members
448,889
Latest member
TS_711

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top