Problem with cell references

MuddyBrain3

New Member
Joined
Feb 21, 2011
Messages
44
Can anyone tell me why this works:
Code:
=SUM(INDEX('Sales Record'!B$2:[B]M$42[/B], 0, ROWS(D$3:D3)))
but this doesn't work:

Code:
=SUM(INDEX('Sales Record'!B$2:[B]INDIRECT($D$2)[/B], 0, ROWS(D$3:D3)))
where $D$2 in the active sheet contains the text value reference M$42

I receive a VALUE error.
 
Last edited:

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Re: Using cell references in a a formula

I think it would need to be:

Code:
=SUM(INDEX(INDIRECT("'Sales Record'!B$2:" & $D$2), 0, ROWS(D$3:D3)))
 
Upvote 0

Forum statistics

Threads
1,224,594
Messages
6,179,792
Members
452,942
Latest member
VijayNewtoExcel

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