Get cell Value from different sheet (='Sheetname'!CellAdresse), but the sheet name has to be taken from 5digits+text from collumn B

mysticmario

Active Member
Joined
Nov 10, 2021
Messages
323
Office Version
  1. 365
Platform
  1. Windows
Basically the title sums it up here's a screen shot showing collumn B which has 5 digits which correspond to a sheet name 5 digits+"Godziny". in collumn I i wnat to have a value from cell G59 of that sheet.
Is there a way to ue formula, or I need to use VBA for that?

Bez tytułu.png
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
How about
Excel Formula:
=INDIRECT("'Godziny"&LEFT(B2,5)&"'!G59")
 
Upvote 0
Solution
I was going to suggest what Fluff shows, but how did you get G59? You may need a different formula to be able to copy and paste it to different rows.
 
Upvote 0
Still same problem
even though I tried different version of your code. I get the idea behind it, but something goes south when I try to apply it.
Also why &"'G59")? when i just want valud from this cell in that ("'Godziny"&LEFT(B2,5) sheet?
 
Upvote 0
You will probably need to change the commas to semi-colons.
Also what language version are you using?
 
Upvote 0
You will probably need to change the commas to semi-colons.
Also what language version are you using?
I tried semi-colons even before u said coz it's a known issue. I used PL version of excel however it was able to execute code in ENG I often time mix those 2
 
Upvote 0
I made it, your given code was ok, for the first time ever I needed to translate this into PL,. I also used wrong syntax for LEFT in PL.
Thank you for your assitance
 
Upvote 0
Glad you sorted it & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,016
Members
448,936
Latest member
almerpogi

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