DutchKevin
Board Regular
- Joined
- Apr 13, 2011
- Messages
- 133
- Office Version
- 365
- Platform
- Windows
Hi Friends,
Please help find me what is going wrong here. I'm bugging too long now,
inside a sub() I wrote this:
BGS is a number 1-9 picked from the selected cell. That works and shows in the message box.
BGL uses BGS and looks for it in named range "BGroup" for second the column.
Any help is very welcome
Kevin
Please help find me what is going wrong here. I'm bugging too long now,
inside a sub() I wrote this:
Code:
Dim BSG As Variant
Dim BGL As String
BGS = Right(Selection, 1) ' Group Number 1-9
'MsgBox BGS
BGL = Application.WorksheetFunction.VLookup(BGS, Range("BGroup"), 2, False) 'Building Group Name
'MsgBox BGL
BGS is a number 1-9 picked from the selected cell. That works and shows in the message box.
BGL uses BGS and looks for it in named range "BGroup" for second the column.
Any help is very welcome
Kevin