Hi
I have attached Excel file. I have 2 sheets . I want items in sheet 2 to be searched in sheet1 . If it is found in sheet 1 then 'Y' should be displayed in Sheet 1 next column after code.
/forums/uploadfile/f61a1a/09032023131531PM/Items.xlsx
Thanks
Lokesh VarmanPosted Sep 3, 2023, 2:59 PM
Open your Excel file with two sheets, let's call them "Sheet1" and "Sheet2."
In "Sheet1," create a new column next to the column where you want to display 'Y' when an item from "Sheet2" is found.
Use a formula in the new column of "Sheet1" to search for each item in "Sheet2" within the relevant column in "Sheet1" and display 'Y' if it's found, or leave it blank if not found. You can use the VLOOKUP function or a combination of functions like IF and COUNTIF.
For example, if you want to search for items in column A of "Sheet2" within column B of "Sheet1," you can use a formula like this in the new column of "Sheet1" (assuming the first row of data is in row 2)
=IF(COUNTIF(Sheet2!A:A, B2) > 0, "Y", "") This formula checks if the value in cell B2 of "Sheet1" is found in column A of "Sheet2." If it is found, it returns 'Y'; otherwise, it returns an empty string.
Drag the formula down for all the rows in "Sheet1" where you want this check to be performed.
This way, you can identify which items from "Sheet2" are found in "Sheet1" and display 'Y' next to them in "Sheet1."