VBA Lookup
Closed
froggy6703
Posts
16
Registration date
Tuesday March 23, 2010
Status
Member
Last seen
March 29, 2013
-
Mar 21, 2013 at 05:16 PM
froggy6703 Posts 16 Registration date Tuesday March 23, 2010 Status Member Last seen March 29, 2013 - Mar 29, 2013 at 07:04 PM
froggy6703 Posts 16 Registration date Tuesday March 23, 2010 Status Member Last seen March 29, 2013 - Mar 29, 2013 at 07:04 PM
Related:
- Excel vba lookup value in table
- Number to words in excel formula without vba - Guide
- Vba case like - Guide
- How to open vba in excel mac - Guide
- Excel vba check if value exists in list - Guide
- School time table software free download full version - Download - Organisation and teamwork
2 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Mar 23, 2013 at 07:46 AM
Mar 23, 2013 at 07:46 AM
have you tried
ActiveCell.FormulaR1C1 = "=VLOOKUP(""*"" & TRIM(RC[2]) & ""*"",Lookup!R1C1:R9000C2,2,0)"
ActiveCell.FormulaR1C1 = "=VLOOKUP(""*"" & TRIM(RC[2]) & ""*"",Lookup!R1C1:R9000C2,2,0)"
froggy6703
Posts
16
Registration date
Tuesday March 23, 2010
Status
Member
Last seen
March 29, 2013
2
Mar 25, 2013 at 09:57 PM
Mar 25, 2013 at 09:57 PM
That helped, but I need it to find it both ways. Sometimes searching for just part of it and sometime doing a full match. Is that even possible?
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Mar 26, 2013 at 07:13 AM
Mar 26, 2013 at 07:13 AM
It is a formula, how can it behave in two different ways Matt ? If you mean that first find exact match, if exact match is not found use the wild card match, you can use IF
=IF(ISERROR(VLOOKUP(exact lookup cond)), vlookup(wild card look up), vlookup(exact look up))
=IF(ISERROR(VLOOKUP(exact lookup cond)), vlookup(wild card look up), vlookup(exact look up))
froggy6703
Posts
16
Registration date
Tuesday March 23, 2010
Status
Member
Last seen
March 29, 2013
2
Mar 27, 2013 at 10:52 PM
Mar 27, 2013 at 10:52 PM
I think I am asking this incorrectly. I don't think I need to change the coding, I think I need to know if there is a way to do a partial seach from the lookup table itself. For example.
Sheet 1
A1 = 123PRE345
A2 = 234PRE567
A3 = 123ABC456
Sheet 2 (Lookup Table)
Column A Column B
123ABC456 ABC KIT
*PRE* PRE KIT
So for cell A1 and A2 it would return a value of PRE KIT, and A3 it would return a value of ABC KIT.
Does anybody know how to do a partial search like this.
Thank you,
Matt
Sheet 1
A1 = 123PRE345
A2 = 234PRE567
A3 = 123ABC456
Sheet 2 (Lookup Table)
Column A Column B
123ABC456 ABC KIT
*PRE* PRE KIT
So for cell A1 and A2 it would return a value of PRE KIT, and A3 it would return a value of ABC KIT.
Does anybody know how to do a partial search like this.
Thank you,
Matt
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Mar 29, 2013 at 09:00 AM
Mar 29, 2013 at 09:00 AM
Matt what version of excel you are using ?
froggy6703
Posts
16
Registration date
Tuesday March 23, 2010
Status
Member
Last seen
March 29, 2013
2
Mar 29, 2013 at 07:04 PM
Mar 29, 2013 at 07:04 PM
2007