Can I simplify the following condition
If Target.Address = "$E$7" Or Target.Address = "$E$9" Or Target.Address = "$H$7" Or Target.Address = "$H$9"
In Visual Foxpro it would be
If InList(Target.Address, "$E$7", "$E$9", "$H$7", "$H$9")
Can I simplify the following condition
If Target.Address = "$E$7" Or Target.Address = "$E$9" Or Target.Address = "$H$7" Or Target.Address = "$H$9"
In Visual Foxpro it would be
If InList(Target.Address, "$E$7", "$E$9", "$H$7", "$H$9")
There're a few ways.
Probably the most similar to the Foxpro would be
![]()
If Not IsError(Application.Match(Target.Address, Array("$E$7", "$E$9", "$H$7", "$H$9"), 0)) Then MsgBox "it's there" End If
@ByteMarks
That'll do, thank you very much.
Last edited by Paul Newton; 12-29-2022 at 07:29 PM. Reason: Omitted adressee
![]()
If Not Intersect(Target, Range("$E$7,E$9,$H$7,$H$9")) Is Nothing Then 'do stuff End If
Ben Van Johnson
@protonLeah
I think I like that even better, so thank you too![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks