data from adjacent cells

jpowell79

Active Member
Joined
Apr 20, 2006
Messages
336
Office Version
  1. 2021
Platform
  1. Windows
Hi Guys,

can anyone help me with this one...

I need to take a value from cell b39. I will then use this value to determine the correct sheet I should be referencing with the word page in front of this.

For example I have various worksheets.

"page0001"
"page0002"
"page0003"

If cell b39 contained "0001", then I'd be looking to reference worksheet "page0001"

I'm guessing I should be using something along the lines of
Code:
=(INDIRECT("page"&B39)
??


ok so once I have the worksheet I need to be referencing, I need to look in column M and match the cell which contains the same as cell b37.

I then need to take the value of the adjacent cell in column N that is matched.

So for example,

cell b37 = monday22
cell b39 = 0023

I'd need to look in worksheet "page0023" then look in column M for "monday22"

If "monday22" was in cell M9, then grab the value from N9


Another example

cell b37 = wednesday18
cell b39 = 0145

I'd need to look in worksheet "page0145" then look in column M for "wednesday18"

If "wednesday18" was in cel M14, then grab the value from N14


thanks guys :)
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Try

=IF(ISNUMBER(MATCH(B37,INDIRECT("'page"&B39&"'!M1:M100"),0)),VLOOKUP(B37,INDIRECT("'page"&B39&"'!M1:N100"),2,0),"")

Adjust ranges to suit
 
Upvote 0

Forum statistics

Threads
1,215,032
Messages
6,122,770
Members
449,095
Latest member
m_smith_solihull

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