Please correct formula,

srizki

Well-known Member
Joined
Jan 14, 2003
Messages
1,837
Office Version
  1. 365
Platform
  1. Windows
I have several worksheets names listed in column B of consolidated worksheet, expenses in column H of consolidated worksheet and column heading in row 4. I want a formula that bring the values from corresponding sheets, by matching column A for sheet name, column H for expense type and row 4 for heading.
I tried to build the following formula that is not working,
'=INDEX(INDIRECT("'"&B25&"'!'115'!L5:Q11"),MATCH(G25,INDIRECT("'"&B25&"'!'115'!B5:B11"),0),MATCH(U4,INDIRECT("'"&B25&"'!4:4"),0))

Thanks

 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
A
BCDEF
RCRC NAMETUV
VersionRCGeneral & AdministrationsGeneral/OperRC OWNERRC NAMEPipelinesTerminalsGas Storage
2014B015General & AdministrationsG & A015 G & A DIRECT0.00%0.00%0.00%
115General & AdministrationsG & A115 DIRECTOR'S CHARGES
117General & AdministrationsG & A117 ADMINISTRATION VACATION ACCRUAL
120General & AdministrationsG & A120 CORPORATE MGMT HOUSTON
121General & AdministrationsG & A 121 Legal Department
126General & AdministrationsG & A 126 OFFICE OF THE CHAIRMAN
132General & AdministrationsG & A132 HR Department
137General & AdministrationsG & A137 INVESTOR RELATIONS
138General & AdministrationsG & A138 CORPORATE DEVELOPMENT
146
General & AdministrationsG & A
146 FINANCE ADMINISTRATION









<colgroup><col width="64" style="width: 48pt;"><colgroup><col width="43" style="width: 32pt; mso-width-source: userset; mso-width-alt: 1572;"><colgroup><col width="195" style="width: 146pt; mso-width-source: userset; mso-width-alt: 7131;"><colgroup><col width="101" style="width: 76pt; mso-width-source: userset; mso-width-alt: 3693;"><colgroup><col width="16" style="width: 12pt; mso-width-source: userset; mso-width-alt: 585;"><colgroup><col width="260" style="width: 195pt; mso-width-source: userset; mso-width-alt: 9508;"><colgroup><col width="64" style="width: 48pt;" span="3"><tbody>
</tbody>
2014 BUDGET UPDATE2014 UPDATE
Responsibility NameExpensePipelinesTerminalsGas StorageBESBDLGMCorporateTotalPipelinesTerminalsGas StorageBESBDLGMCorp.Total
115 DIRECTOR'S CHARGESPAYROLL REGULAR EXPENSE 100.0%100.0%34.5%28.8%2.0%2.4%4.2%28.1%-100%0.0%
115 DIRECTOR'S CHARGESPAYROLL CHARGED 100.0%100.0%34.5%28.8%2.0%2.4%4.2%28.1%-100%0.0%
115 DIRECTOR'S CHARGESTRAVEL EXPENSE 100.0%100.0%34.5%28.8%2.0%2.4%4.2%28.1%-100%0.0%
115 DIRECTOR'S CHARGESCOMMUNICATION EXPENSE 100.0%100.0%34.5%28.8%2.0%2.4%4.2%28.1%-100%0.0%
115 DIRECTOR'S CHARGESOTHER CONTROLLABLE EXPENSE 100.0%100.0%34.5%28.8%2.0%2.4%4.2%28.1%-100%0.0%
115 DIRECTOR'S CHARGESPROFESSIONAL FEES EXPENSE 100.0%100.0%34.5%28.8%2.0%2.4%4.2%28.1%-100%0.0%
115 DIRECTOR'S CHARGESPAYROLL BENEFITS EXPENSE 100.0%100.0%34.5%28.8%2.0%2.4%4.2%28.1%-100%0.0%
115 DIRECTOR'S CHARGESExpenses
<colgroup><col width="185" style="width: 139pt; mso-width-source: userset; mso-width-alt: 6765;"> <col width="208" style="width: 156pt; mso-width-source: userset; mso-width-alt: 7606;"> <col width="60" style="width: 45pt; mso-width-source: userset; mso-width-alt: 2194;" span="8"> <col width="6" style="width: 5pt; mso-width-source: userset; mso-width-alt: 219;"> <col width="76" style="width: 57pt; mso-width-source: userset; mso-width-alt: 2779;"> <col width="60" style="width: 45pt; mso-width-source: userset; mso-width-alt: 2194;" span="7"> <tbody> </tbody>
 
Upvote 0
I have found the answer.
=INDEX(INDIRECT("'"&B94&"'!L1:L35"),MATCH(G94,INDIRECT("'"&B94&"'!B1:B35"),0),MATCH(AC4,INDIRECT("'"&B94&"'!L4:R4"),0))

But the problem is how can I drag this to other cells?
 
Upvote 0

Forum statistics

Threads
1,214,387
Messages
6,119,225
Members
448,877
Latest member
gb24

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