WednesdayC
Board Regular
- Joined
- Nov 7, 2010
- Messages
- 201
- Office Version
- 2016
- Platform
- MacOS
Hi All
Can anyone help me please, as I have been trying to sort this out for ages, with no success.
The formula when I use the hard coded value is working, but nothing I have tried is working with the variable, and I do need the wildcards.
I would be very grateful for any help.
Thank you in advance
Regards
Wednesday
Can anyone help me please, as I have been trying to sort this out for ages, with no success.
Code:
strName = ActiveCell.Value
strName = Left(strName, 10)
ActiveCell.Offset(, -5).Formula = _
"=IFERROR(INDEX('[TEMP.xlsb]MASTER'!$A:$A,MATCH(TRIM(""* Adele*""),'[TEMP.xlsb]MASTER'!$B:$B,0)),"""")"
ActiveCell.Offset(, -5).Formula = _
"=iferror(INDEX('[TEMP.xlsb]MASTER'!$A:$A,MATCH((""*"" & strName & ""*""),'[TEMP.xlsb]MASTER'!$B:$B,0)),"""")"
The formula when I use the hard coded value is working, but nothing I have tried is working with the variable, and I do need the wildcards.
I would be very grateful for any help.
Thank you in advance
Regards
Wednesday