# Concatenating Cells to give a Sheet Reference to a formula..

#### Puma

##### Board Regular
Hello all.

Is it possible to write a formula which retrieves a value from one of a number of avaliable sheets based on the values of different cells???

Ie. This formula:

='sheet1'!AC38

Becomes something like:

='B2 & " " & C2'!AC38

I have two variables, A and B plotted horizontally and vertically and Bassically, I need to populate a grid with values from a whole host of sheets in the same workbook.

I could reference them by hand but, it would take ages and i may need to change some of the B titles (and the results sheets) at some time in the future so, if i can write it into a formula that would be better.

Any thoughts gratefully recieved.

Cheers.

Dave

### Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

#### bigbob

##### Board Regular
Re: Concatenating Cells to give a Sheet Reference to a formu

Hi
Look at the ADDRESS funnction in HELP and see if it is what you want
Bob

#### ken2step

##### Well-known Member
Re: Concatenating Cells to give a Sheet Reference to a formu

Cell A1=G3
Cell A2= :
Cell A3=G5
Cell G3=5
Cell G4=5
Cell G5=5

Cell A4=sum(indirect(A1&A2&A3))
Formula result in Cell A4=15

=indirect("'"&B2&C2"'!"&AC38
note there is NO space in sheet1

#### Puma

##### Board Regular
Re: Concatenating Cells to give a Sheet Reference to a formu

Cheers.

That's what i was after. I might need to use a newer version of Excel though as the formula didn't work (excel 97). Looks like what i was after though so, thanks.

Dave

#### ken2step

##### Well-known Member

Re: Concatenating Cells to give a Sheet Reference to a formu

Are you saying the Sum example did not work or Example for your data did not work?

#### ken2step

##### Well-known Member
ken2step said:
Are you saying the Sum example did not work or Example for your data did not work?

#### Puma

##### Board Regular
Re: Concatenating Cells to give a Sheet Reference to a formu

The '=indirect("'"&B2&C2"'!"&AC38 ' bit causes excel to moan but, i haven't definitly got the first section working yet so, it's probably just a teathing problem...

If i can't get it working relativly soon, i'll shout for help )

Dave

Replies
3
Views
84
Replies
12
Views
304
Replies
2
Views
242
Replies
0
Views
179
Replies
0
Views
467

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,151,972
Messages
5,767,402
Members
425,410
Latest member
SmittyT

### 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.

### Which adblocker are you using?

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

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