View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default vlookup function

Try this:

In the following, VLData is your lookup table (3 Columns as per your Unique
Records).

Assuming the records to be populated have data in coums A, B and C starting
in the second row then:

Put the following in B2

IF(ISERROR(VLOOKUP(A2,VLData,2)),"",VLOOKUP(A2,VLD ata,2))

and this in C2

=IF(ISERROR(VLOOKUP(A2,VLData,3)),"",VLOOKUP(A2,VL Data,3))

Drag both columns down for your 1000 records.

When you enter a Number (in Column A) the name and address will be filled in
or left blank if there is no entry in VLData..


HTH

"Blobbies" wrote:

Hi there

I have a template that I use for various sets of data that I receive from
time to time.

The data has a unique number, to which I have to enter in the associated
details manually.

The unique number however may feature many times in the data.

The template is set up to cope with 1000 records. I use the vLookup
function to populate the rows of data, according to the unique number.

I am sure that someone would be able to advise me on how I could create a
macro or VBA to do this, instead of just using the function.

i.e.

UNIQUE RECORDS

Number Name Address
0001 Eddie 2 Smith Street
0002 Oliver 34 Jones Street

Would need to populate:

Number Name Address
0002
0002
0001
0002
0001

Many thanks for taking the time to read this and for any suggestions that
may be forthcoming!!