Macro to look up and return location

RattlingCarp3048

Board Regular
Joined
Jan 12, 2022
Messages
166
Office Version
  1. 365
Platform
  1. Windows
Im looking for some help building a macro to look up the user entered data and return the location data. For example, Ive created a tab called Lookup. I would like the user to enter the data in column A. Then the macro to return the tab name, cell location, title of the column, and folder location of the column.

*Lookup the accession in whole document
*Drawer location will always be row 1 of the same column the accession was found
*Folder location will always be row 2 of the same column the accession was found
*Return "Accession not found" if error

Example
A B C D E
Accession #Tab NameCell LocationDrawerFolder
NT22011115NTDrawer10-OctoberG12
Drawer 10​
2​
WG22014160WGDrawer9-SeptemberDM21
Drawer 9​
24​
WG22015184WG
macro returnmacro returnmacro returnmacro return


1674577338014.png
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Can you show us some data? Like where do you need to find Accession? In which column? In which sheet? Is lookup sheet empty?
 
Upvote 0
Can you show us some data? Like where do you need to find Accession? In which column? In which sheet? Is lookup sheet empty?
The Lookup tab will only have the example table above. The idea is that the user will input an accession in column A and the macro will populate the locations in columns B-E. The macro will need to search the entire workbook to find the Accession. There are 13 tabs total (12 tabs with data + thw lookup tab).

Formulas instead of macro is also an option if that's an easier route to go.

Currently we are searching one accession at a time via ctrl+find+search entire workbook. However, this is very time consuming as we regularly need to locate 50-200 accession at a time. The ability to use a formula or a macro to search through the entire workbook would definitely speed things up. If it were all on a single sheet a simple lookup formula would suffice but I cannot figure out how one an entire workbook.
 
Upvote 0

Forum statistics

Threads
1,215,326
Messages
6,124,268
Members
449,149
Latest member
mwdbActuary

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