View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
carlo carlo is offline
external usenet poster
 
Posts: 367
Default lookup from one document to another and paste in adjacent cell

Hi Howard

couldn't you do that with just a vlookup?
and why two documents, 2 sheets would be enough, right?
Let's say you have a sheet "special" and a sheet "data".
In special column A you can fill in your product code.
In data column T you can put following formula:

=IF(ISERROR(VLOOKUP(B1,special!A:A,1,FALSE)),"","1 ")

hth Carlo

On Nov 1, 7:20 am, "
wrote:
I have a list of about 30,000 products and am looking to advertise
specials but want to be able to mark them in the spreadsheet with a 1
in the last column next to the product code. I figure the easiest way
to do this is to have a separate document that I can manually edit by
just typing in product codes that I want to advertise then cross
referencing the two lists to add the 1 in the last column. I have
tried to outline what needs to happen below.

Set product code in A1 from specials.xls,sheet 1 as variable, search
for this product code in the main database column B , if found paste
"1" in the same row column T, if not found then just move onto the
next cell in specials.xls,sheet1 and do the same lookup. If next cell
is empty end lookup.

Any help would be appreciated,
Thanks,
Howard