Search old worksheet for match then take date in next column and place in cell in new worksheet

IainD

Board Regular
Joined
Jun 25, 2007
Messages
75
OK let me see if I can explain what I am trying to do here.

I have two worksheets one with old data and one with new.

- New worksheet has additional rooms, but does not have a department column.
- Old worksheet does not have the new rooms, but has departments for each room.

For each individual room number on the new worksheet I want to query the entire range of room numbers on the old worksheet and where I find a match take the department in the next column cell on the old worksheet and move it to the column to the right of the room number of the new worksheet.

Can anyone suggest a method that may be able to achieve this?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
use an index match or vlookup

assuming
old sheet is sheet2 and the room is in column A and dep in column b
and newsheet
column a is the room number
and dept in column b is required

=index(sheet2!B:B, match( a2, sheet2!a:a, 0))

where the room does not match you will get a
#N/A error

or

=vlookup(a2, sheet2!A;B, 2, false)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,830
Messages
6,121,835
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top