View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Move from a function statement to VBA code?

Do you really need to check every cell, or can the rows/columns be
restricted to a more sensible range?

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"hshayh0rn" wrote in message
...
I have some worksheets that use a Vlookup statement to get information

from
other worksheets. Right now I have the statement below repeated for 1000
rows. I'd like to remove these statement and complete the work entirely in
VBA code. One of the reasons for this is to make the speadsheet a little
quicker in some instances and more dynamic in others. Generally we don't

have
the need for 1000 rows BUT we never truly know how many rows we need and

just
yesterday we needed 1010 rows which meant I had to send out a revised
sheadsheet to that particular user. Could anyone like to help with with

the
code I need to get the same results I would get below? The statement below
appears in cell A2 on a worksheet call "consolidate sheet" and is repeated
for 1000 row but as I mentioned I need it to populate the cells in column

A
of the "consolidated sheet" until there is no more data to get.

=IF(ISERROR(VLOOKUP($D2,'XXX User
Report'!$1:$65536,2,FALSE)),"",VLOOKUP($D2,'XXX User
Report'!$1:$65536,2,FALSE))


Thank you for your help in advance.