Hi All,
I was hoping there would be a way to write a VBA script that is basically a vlookup but needs to be able to be case sensitive.
I have two sheets in my workbook. Sheet 1 has the Account ID and Sheet 2 has Account ID and Names (examples below). I would like to the VBA to look at Sheet 1's account numbers and find the corresponding Names in Sheet 2 to bring over. The catch is, as you can see, some of my account numbers are the same except for the capitalization, which is why i can't use a standard vlookup. Please let me know if someone could help me with writing this VBA. I have tried to use =LOOKUP(9.99999999999999E+307,FIND($D64,'Sheet2'!$A$3:$A$3009),'Sheet2'!$B$3:$B$3009) but when i update I always have random #N/As come up and I don't want to deal with going through them on a monthly basis to figure out why.
[TABLE="class: cms_table, width: 264"]
<tbody>[TR]
[TD]Account ID[/TD]
[TD]Account Name[/TD]
[/TR]
[TR]
[TD]0013600000LeWaJ[/TD]
[TD]Caroline[/TD]
[/TR]
[TR]
[TD]0013600000LeWaj[/TD]
[TD]Mike[/TD]
[/TR]
[TR]
[TD]0013600000LeWaK[/TD]
[TD]Pat[/TD]
[/TR]
[TR]
[TD]0013600000LeWak[/TD]
[TD]David[/TD]
[/TR]
[TR]
[TD]0013600000LeWaL[/TD]
[TD]Emily[/TD]
[/TR]
[TR]
[TD]0013600000LeWal[/TD]
[TD]Jeff[/TD]
[/TR]
[TR]
[TD]0013600000LeWaM[/TD]
[TD]Kevin[/TD]
[/TR]
[TR]
[TD]0013600000LeWam[/TD]
[TD]Greg[/TD]
[/TR]
[TR]
[TD]0013600000LeWaN[/TD]
[TD]Jennifer[/TD]
[/TR]
[TR]
[TD]0013600000LeWan[/TD]
[TD]Stephanie[/TD]
[/TR]
[TR]
[TD]0013600000LeWaO[/TD]
[TD]Brad[/TD]
[/TR]
[TR]
[TD]0013600000LeWao
Thank you in advance for your time! [/TD]
[TD]Tony[/TD]
[/TR]
</tbody>[/TABLE]
I was hoping there would be a way to write a VBA script that is basically a vlookup but needs to be able to be case sensitive.
I have two sheets in my workbook. Sheet 1 has the Account ID and Sheet 2 has Account ID and Names (examples below). I would like to the VBA to look at Sheet 1's account numbers and find the corresponding Names in Sheet 2 to bring over. The catch is, as you can see, some of my account numbers are the same except for the capitalization, which is why i can't use a standard vlookup. Please let me know if someone could help me with writing this VBA. I have tried to use =LOOKUP(9.99999999999999E+307,FIND($D64,'Sheet2'!$A$3:$A$3009),'Sheet2'!$B$3:$B$3009) but when i update I always have random #N/As come up and I don't want to deal with going through them on a monthly basis to figure out why.
[TABLE="class: cms_table, width: 264"]
<tbody>[TR]
[TD]Account ID[/TD]
[TD]Account Name[/TD]
[/TR]
[TR]
[TD]0013600000LeWaJ[/TD]
[TD]Caroline[/TD]
[/TR]
[TR]
[TD]0013600000LeWaj[/TD]
[TD]Mike[/TD]
[/TR]
[TR]
[TD]0013600000LeWaK[/TD]
[TD]Pat[/TD]
[/TR]
[TR]
[TD]0013600000LeWak[/TD]
[TD]David[/TD]
[/TR]
[TR]
[TD]0013600000LeWaL[/TD]
[TD]Emily[/TD]
[/TR]
[TR]
[TD]0013600000LeWal[/TD]
[TD]Jeff[/TD]
[/TR]
[TR]
[TD]0013600000LeWaM[/TD]
[TD]Kevin[/TD]
[/TR]
[TR]
[TD]0013600000LeWam[/TD]
[TD]Greg[/TD]
[/TR]
[TR]
[TD]0013600000LeWaN[/TD]
[TD]Jennifer[/TD]
[/TR]
[TR]
[TD]0013600000LeWan[/TD]
[TD]Stephanie[/TD]
[/TR]
[TR]
[TD]0013600000LeWaO[/TD]
[TD]Brad[/TD]
[/TR]
[TR]
[TD]0013600000LeWao
Thank you in advance for your time! [/TD]
[TD]Tony[/TD]
[/TR]
</tbody>[/TABLE]