systemlordanubis
New Member
- Joined
- Nov 14, 2016
- Messages
- 3
Hi All,
In one of my sheets I have the following formula in a field:
{VLOOKUP(E5,CHOOSE({1,2}, 'Sheet1'!B3:B100 & ":" & 'Sheet1'!C3:C100, 'Sheet1'!G3:G100), 2, 0)}
I'm needing to convert this formula into pure VBA but I'm having an issue with this part:
'Sheet1'!B3:B100 & ":" & 'Sheet1'!C3:C100
This is what I have so far for the VBA equivalent:
Application.WorksheetFunction.VLookup("ValueOfE5", Application.WorksheetFunction.Choose(Array(1, 2), TheWorksheet.Range("B3:B100") & ":" & TheWorksheet.Range("C3:C100"), TheWorksheet.Range("G3:G100")), 2, False)
Is there a way I can concatenate these two columns together (B & C) with the intermediary 'colon' so that I can match the value.
The sample data of each of the fields is:
E5 = "Apple:123"
Sheet1!B = "Apple"
Sheet1!C = "123"
Sheet1!G = Value I require
Any suggestions would be most welcome.
Thanks
Anubis.
In one of my sheets I have the following formula in a field:
{VLOOKUP(E5,CHOOSE({1,2}, 'Sheet1'!B3:B100 & ":" & 'Sheet1'!C3:C100, 'Sheet1'!G3:G100), 2, 0)}
I'm needing to convert this formula into pure VBA but I'm having an issue with this part:
'Sheet1'!B3:B100 & ":" & 'Sheet1'!C3:C100
This is what I have so far for the VBA equivalent:
Application.WorksheetFunction.VLookup("ValueOfE5", Application.WorksheetFunction.Choose(Array(1, 2), TheWorksheet.Range("B3:B100") & ":" & TheWorksheet.Range("C3:C100"), TheWorksheet.Range("G3:G100")), 2, False)
Is there a way I can concatenate these two columns together (B & C) with the intermediary 'colon' so that I can match the value.
The sample data of each of the fields is:
E5 = "Apple:123"
Sheet1!B = "Apple"
Sheet1!C = "123"
Sheet1!G = Value I require
Any suggestions would be most welcome.
Thanks
Anubis.