View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default Cross-referencing content of one worksheet with another

Put this formula in a helper column (e.g. in F1) of Sheet1:

=IF(ISNA(MATCH(E1,Sheet2!B:B,0)),D1,INDEX(Sheet2!A :A,MATCH(E1,Sheet2!B:B,0)))

Then you can copy this formula down to cover all the data you have in
Sheet1.

When you are happy that it does what you want, you can fix the values in
column F and then copy/paste them over the values in column D, and then
delete column F.

Hope this helps.

Pete


"Colin Hayes" wrote in message
...


Hi All

I have a little puzzle.

I have a workbook with two worksheets.

In Sheet 1 , column D contains a number to 2 decimal places , and column E
contains a reference number.

In Sheet 2 , column A contains equally a number to 2 decimal places , and
column B contains a Reference Number.

I need a formula or a macro which will check the Reference Numbers in
sheet 1 with sheet 2 and , where there is a a match , bring the number
from column A to overwrite the number in column D. Effectively , updating
the numbers to 2 decimal places in Sheet 1 with the ones from Sheet 2. The
Reference Numbers would be unchanged.

It should look for a match anywhere between the 2 columns , and continue
down until it has got to the final row , each time bringing the number
from ws2 to ws1

Can anyone help with this?

Grateful for any help.



Best Wishes