How to use the value from a column to refer to a specific spreadsheet

miamianderson

New Member
Joined
Dec 4, 2014
Messages
11
Column A is a list of job titles. I have separate worksheets within the same workbook that are each named with each job title. In column B I am looking for a way to sum a particular array of cells in each worksheet. I was hoping to to be able to write a formula and drag it down my page, where within the formula it would identify which worksheet I want to reference (based on the value in column A). I tried the "Indirect" function, but kept on getting a "#REF!" error, and as I've never used that formula before, I'm clearly doing something wrong. Any guidance is super appreciated.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Please post your formula, so we can see what you are doing.
 
Upvote 0
If Column A is the list of the names of all the worksheets, and on each worksheet I want to pull the sum of cells O2:O50, in Column B, next to the name of each worksheet, what I was trying was something like "=SUM('INDIRECT("A4")'!O2:O50)"
 
Upvote 0
Try writing it like this:
=SUM(INDIRECT("'" & A4 & "'!O2:O50"))
 
Upvote 0
What is the value in A4?
 
Upvote 0
However, it returns a #REF! error.
That seems to suggest that there is no sheet in your workbook with the name of what is appearing in cell A4.
Make sure that you do not have any extra spaces at the beginning or end.
 
Upvote 0
You are welcome.
Glad we were able to help.
 
Upvote 0

Forum statistics

Threads
1,213,510
Messages
6,114,037
Members
448,543
Latest member
MartinLarkin

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