Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a formula in the form:
=G1*'Producer 1'!B1+G2*'Producer 1'!B2+G3*'Producer 1'!B3+G4*'Producer 1'!B5 I would like to be able to replace 'Producer 1'! with any other worksheet from a list in a reference cell. Thus by changing the reference cell I could come up with: =G1*'Producer 2'!B1+G2*'Producer 2'!B2+G3*'Producer 2'!B3+G4*'Producer 2'!B5 Is this possible and if so how? I am very confused. I have attempted to use the indirect function but have not had any success thus far. Thanks, Andrew |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Assuming you have the sheet name in C1...
=G1*INDIRECT(C1&"!B1")+G2*INDIRECT(C1&"!B2")+G3*IN DIRECT(C1&"!B3")+G4*INDIRECT(C1&"!B5") -- Rick (MVP - Excel) "Alaska_Word_novice" wrote in message ... I have a formula in the form: =G1*'Producer 1'!B1+G2*'Producer 1'!B2+G3*'Producer 1'!B3+G4*'Producer 1'!B5 I would like to be able to replace 'Producer 1'! with any other worksheet from a list in a reference cell. Thus by changing the reference cell I could come up with: =G1*'Producer 2'!B1+G2*'Producer 2'!B2+G3*'Producer 2'!B3+G4*'Producer 2'!B5 Is this possible and if so how? I am very confused. I have attempted to use the indirect function but have not had any success thus far. Thanks, Andrew |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I think you need to include all those stupid quotes for the sheet name:
=G1*INDIRECT("'"&C1&"'!B1")+G2*INDIRECT("'"&C1&"'! B2")+G3*INDIRECT("'"&C1&"'!B3")+G4*INDIRECT("'"&C1 &"'!B5") Too bad B5 is the odd cell out! =SUMPRODUCT(G1:G3,INDIRECT("'"&C1&"'!B1:B3"))+G4*I NDIRECT("'"&C1&"'!B5") -- Biff Microsoft Excel MVP "Rick Rothstein" wrote in message ... Assuming you have the sheet name in C1... =G1*INDIRECT(C1&"!B1")+G2*INDIRECT(C1&"!B2")+G3*IN DIRECT(C1&"!B3")+G4*INDIRECT(C1&"!B5") -- Rick (MVP - Excel) "Alaska_Word_novice" wrote in message ... I have a formula in the form: =G1*'Producer 1'!B1+G2*'Producer 1'!B2+G3*'Producer 1'!B3+G4*'Producer 1'!B5 I would like to be able to replace 'Producer 1'! with any other worksheet from a list in a reference cell. Thus by changing the reference cell I could come up with: =G1*'Producer 2'!B1+G2*'Producer 2'!B2+G3*'Producer 2'!B3+G4*'Producer 2'!B5 Is this possible and if so how? I am very confused. I have attempted to use the indirect function but have not had any success thus far. Thanks, Andrew |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
But of course... yes... the single quotes are necessary in case the sheet
name is not a single word. Thanks for catching that. Maybe the OP mistyped the 5 instead of typing a 4. To the OP... if that is what you did, then this is what Biff was thinking about... =SUMPRODUCT(G1:G4,INDIRECT("'"&C1&"'!B1:B4")) -- Rick (MVP - Excel) "T. Valko" wrote in message ... I think you need to include all those stupid quotes for the sheet name: =G1*INDIRECT("'"&C1&"'!B1")+G2*INDIRECT("'"&C1&"'! B2")+G3*INDIRECT("'"&C1&"'!B3")+G4*INDIRECT("'"&C1 &"'!B5") Too bad B5 is the odd cell out! =SUMPRODUCT(G1:G3,INDIRECT("'"&C1&"'!B1:B3"))+G4*I NDIRECT("'"&C1&"'!B5") -- Biff Microsoft Excel MVP "Rick Rothstein" wrote in message ... Assuming you have the sheet name in C1... =G1*INDIRECT(C1&"!B1")+G2*INDIRECT(C1&"!B2")+G3*IN DIRECT(C1&"!B3")+G4*INDIRECT(C1&"!B5") -- Rick (MVP - Excel) "Alaska_Word_novice" wrote in message ... I have a formula in the form: =G1*'Producer 1'!B1+G2*'Producer 1'!B2+G3*'Producer 1'!B3+G4*'Producer 1'!B5 I would like to be able to replace 'Producer 1'! with any other worksheet from a list in a reference cell. Thus by changing the reference cell I could come up with: =G1*'Producer 2'!B1+G2*'Producer 2'!B2+G3*'Producer 2'!B3+G4*'Producer 2'!B5 Is this possible and if so how? I am very confused. I have attempted to use the indirect function but have not had any success thus far. Thanks, Andrew |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
format a cell with a formula so an empty reference cell shows blan | Excel Discussion (Misc queries) | |||
Using a cell reference within a cell reference in a formula | Excel Worksheet Functions | |||
How do I leave formula cell blank if 2nd reference cell is empty? | Excel Discussion (Misc queries) | |||
Cell Formula reference to cell Based On third Cell Content | Excel Discussion (Misc queries) | |||
Cell Formula reference to cell Based On third Cell Content | Excel Discussion (Misc queries) |