Search code examples
excelexcel-formulavlookupworksheet-functionlookup-tables

Link two cells of a column in different sheets if a value in a cell of other column matches in other sheet


I have a workbook with 7 sheets containing part number of a product in column and its cost in adjacent column. And the 7th sheet contains total number of parts in all the sheets. I want to change cost of some products but then I have to do the same in all sheets. Is there a way by which it automatically finds and changes cost in individual sheets when i change it in the sheet containing total?


Solution

  • Use VLOOKUP on the first 6 sheets to match the price to each part number.

    So, in each "cost" column on the first 6 sheets, enter this formula (assuming Cost on Sheet7 is still in column C):

    =IFERROR(IF($A1="","",VLOOKUP($A1,Sheet7!$A:$C,3,FALSE)),"")
    

    If you have header row(s) then just replace the two instances of $A1 in the formula with whatever the first row of data is (e.g. $A2), paste the formula into that row in column C on Sheet1, then drag-copy the formula down as far as you want. Repeat for sheets 2-6.