How do you do....it? Thread, Excel formula, cell contents moved in Technical; Hi all, Hope this is in the right place! I have two Excel spreadsheets, where the data in speadsheet 2 ...
1. ## Excel formula, cell contents moved

Hi all,

Hope this is in the right place! I have two Excel spreadsheets, where the data in speadsheet 2 uses a formula to take the content from a cell on spreadsheet 1, ie:

Spreadsheet 2 cell B2 = something + spreadsheet 1 cell B2
Spreadsheet 2 cell B3 = something + spreadsheet 1 cell B3

and so on.

The problem is that the data that is on speadsheet 1 now needs to be moved around, so cell B2 could become B12, B3 could become B30, or any c ell in the B coloumn really!

My question is, is there a way to tell Excel to look at the content of coloumn A (people's names) and find the right name, then take the value of the cell next to that name in the B coloumn?

If so I imagine that the formula will need to be tweaked for each cell of speadsheet 2 as each cell will have a different name to search for on spreadsheet 1?

2. If I understand what you are after correctly, then VLookup will do the job. You pass Vlookup the key, the range of cells where the data resides (including the key as the first column), an offset to the data column you want returned and a boolean which specifies whether you want an exact match or the nearest next lowest value. So, assuming you have in spreadsheet 1 a list, (Name, Age) running A1:B100 and in spreadsheet 2 you have a list of Names, you could then, in spreadsheet 2 next to the name (B1) say = Vlookup(A1,"Spreadsheet2"!A1:B100,2,false) and the value in B1 should then be the age.

3. ## Thanks to pcstru from:

Pete10141748 (22nd August 2012)

SHARE: