There are two tables

Table-1

CODE | AMOUNT |

A1 | 200 |

A2 | 400 |

A3 | 300 |

A4 | 500 |

A5 | 600 |

A6 | 700 |

A7 | 800 |

A8 | 900 |

A9 | 100 |

A10 | 500 |

Table-2

CODE | AMOUNT |

A1 | 200 |

A3 | 300 |

A6 | 350 |

A7 | 800 |

A8 | 1800 |

A9 | 100 |

A10 | 500 |

A2 | 400 |

A11 | 10 |

A12 | 200 |

A13 | 300 |

A10 | 400 |

Need a table like this

CODE | AMOUNT | DIFFRENCE |

A1 | 200 | 0 |

A3 | 300 | 0 |

A6 | 700 | 350 |

A7 | 800 | 0 |

A8 | 900 | -900 |

A9 | 100 | 0 |

A10 | 500 | 0 |

A2 | 400 | 0 |

A11 | #N/A | #N/A |

A12 | #N/A | #N/A |

A13 | #N/A | #N/A |

A10 | 500 | 100 |

The third table contains all the Codes of table-2 and the amount from table-1 wrt to code(which are present in table-1) and the diff col (table-1_amount - table-3_amount). Normally it is a VLOOKUP. (table-3 contains the amount of all those codes which are present in table-1 and table-2)

Need to perform this using LINQ.