[RESOLVED] [Excel] VLOOKUP
I need to programmatically set up a vlookup for a column starting at row 11 column G. The lookup range will be on sheet2 row 2-65535 and columns A:B. The issue is that it needs to be dynamic as the lookup range will be increased as new items are added when new vendors are added.
This is a smaller part of a large solution and once the lookup is run I need column G to be converted to a non-lookup column or just a Values column. This sheet is being read in by another program and the formula is throwing it off.
I will be calling the code from a menu item so that part I can do. I am on a time limit here or I would be able to do more of it myself.
So how to modify the lookup source range to include all items when a new one is added?
Thanks guys
VB Code:
'Select column G row 11 - End
Workbooks(1).Sheets("Sheet1").Range("G11:G65535").Select
'Apply formula for vlookup - this already does rows 2 - 13 and columns 1 - 2 on sheet2. needs extending
Workbooks(1).Sheets("Sheet1").Range.FormulaR1C1 = "=VLOOKUP(RC[11]:R[11]C[11],Sheet2!R[-9]C[-6]:R[2]C[-5],2,TRUE)"
Re: [RESOLVED] [Excel] VLOOKUP
Anything else I can help you with? If not, don't forget to mark this thread as resolved... :p
jk. Always a pleasure, RD.
Re: [RESOLVED] [Excel] VLOOKUP
Unles you know sp's or asp.net or ado.net? :D
Re: [RESOLVED] [Excel] VLOOKUP
ADO.Net I've never worked with. ASP.Net I'd like to learn. And I don't even know what sp's stands for. So that's no, no and no. Sorry. :D
Re: [RESOLVED] [Excel] VLOOKUP
Stored Procedure in SQL Server. :)
I just got some help with the security of the sp so I am now moving on to the ADO.NET part. Thanks anyways :thumb:
More destressing going on. 3-4 hours left. :(