Thread: VLOOKUP
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
phil phil is offline
external usenet poster
 
Posts: 201
Default VLOOKUP

Hi,

Not sure if this is the right section of this site to post this question so
bear with us, I have written a piece of VBA code that selects data from SQL
and puts it into a small table on sheet1, then on sheet2 I am using a vlookup
to look at the data on sheet1 and put it in the relevant sections, the
problem that I am having is when I run the vba code, which repopulates the
data on Sheet1 "this never contains any more rows, just different numbers so
the range is never different" the Vlookup breaks, rather than giving the
range A1:B23, it reverts back to A1:A23, breaking everything, if I go back in
an manually change this it works again???? It might have something to do
with the column with all the numbers in, as this is deleted first and then
the numbers put back in again, can anyone see where I am going wrong.

Thanks PD