ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   lookup from one document to another and paste in adjacent cell (https://www.excelbanter.com/excel-programming/400382-lookup-one-document-another-paste-adjacent-cell.html)

[email protected][_2_]

lookup from one document to another and paste in adjacent cell
 
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


carlo

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





All times are GMT +1. The time now is 12:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com