Excel Novice - attempting to use SUMPRODUCT/SUMIF/INDIRECT but cell shows #REF

minky81

New Member
Joined
Mar 16, 2013
Messages
4
I receive a #REF error for the formula I'm trying to work on. I would be really grateful for some insight.

What I’m trying to do:

I am working on a personal budget for home expenses. I would like to sum all the categories for each month so I can see what is the highest expense for each month. So in the formula, I am trying to find x (in this case, 'Groceries') for a given month and then calculate the total.

Computer: MAC
Workbook: Expenses.xlsx
Sheets: Budget / OCT12 / NOV12 / DEC12 etc.

Budget Sheet:

A B C D
28 DAILY LIVING OCT NOV DEC
29 Groceries #REF
30 Dining / Eating Out
31 Pharmacy Supplies
32 Dry Cleaning
33 Salon / Hair
34 Eyewear / Contacts
35 Clothing
36 Education / Lessons


OCT12:

A B C D
58 DATE CATEGORY DESCRIPTION AMOUNT
59 1-Oct-12 Bus / Taxi / MRT Taxi $10.00
60 1-Oct-12 Dry Cleaning Astoria $10.00
61 1-Oct-12 Groceries Jasons $10.00
62 12-Oct-12 Groceries Market Place $50.00
63 12-Oct-12 Pharmacy Supplies Guardian - Toiletries $30.00
64 13-Oct-12 Groceries Marks & Spencer $60.00
65 13-Oct-12 Hardware / DIY Services Home-Fix DIY $10.00
66 16-Oct-12 Dining / Eating Out Starbucks Coffee $20.00
etc.


PLEASE NOTE: The B column (CATEGORY) allows you to select via a dropdown menu. Will this cause the formula not to work? I have indented the list on the dropdown to look like this ' Groceries', where as in the Budget Sheet A29, it shows 'Groceries'. This was so I could group categories and it was be easy on the eye when searching.

The formula I used which caused an error in cell B29 is:

=SUMPRODUCT(SUMIF(INDIRECT("'"&OCT12&"'!B59:B110"),$A29,INDIRECT("'"&OCT12&"'!D59:D110")))

Please could you let me know what the issue is.

Thanks

M
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Welcome to the forum!!

I would put your data in one big spreadsheet rather than 10's of sheets, it would be much easier to create formulas/references...

I created to dynamic Validation list. This means you are able to add onto these columns and they automatically populate the list. These are set to range for the loopup data and might to be changed at some point in time.

These are your named range formulas:

Catergories

Code:
=OFFSET(Budget!$A$3,,,COUNTA(Budget!$A$3:$A$100),)

(Sheets)

Code:
=OFFSET(Budget!$B$3,,,COUNTA(Budget!$B$3:$B$100),)

Just to show so example:

Budget

*ABCDEF
1CategoriesSheets*MonthCategoryTotal
2******
3GroceriesOCT12*OCT12Pharmacy Supplies $ * 42.00
4Dining / Eating OutNOV12*NOV12Groceries $ * 10.00
5Pharmacy SuppliesDEC12*DEC12Dining / Eating Out $ * 20.00
6Dry Cleaning**OCT12Groceries $ * 36.00
7Salon / Hair**NOV12Dry Cleaning $ * 20.00
8Eyewear / Contacts**DEC12Dining / Eating Out $ * 20.00
9Clothing**OCT12Groceries $ * 36.00
10Education / Lessons*****

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:127.2px;"><col style="width:127.2px;"><col style="width:23.2px;"><col style="width:64px;"><col style="width:134.4px;"><col style="width:64px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
F3{=IFERROR(SUMPRODUCT(--((INDIRECT("'"&D3&"'!B2:B"&COUNTA(INDIRECT("'"&D3&"'!B2:B1000"))+1)=E3))*INDIRECT("'"&D3&"'!D2:D"&COUNTA(INDIRECT("'"&D3&"'!D2:D1000"))+1)),"No Data!")}

<tbody>
</tbody>
Formula Array:
Produce enclosing
{ } by entering
formula with CTRL+SHIFT+ENTER!

<tbody>
</tbody>

Data Validation in Spreadsheet
CellAllowDatasInput 1Input 2
D3List*=Sheets*
E3List*=Categories*

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0
I receive a #REF error for the formula I'm trying to work on. I would be really grateful for some insight.

What I’m trying to do:

I am working on a personal budget for home expenses. I would like to sum all the categories for each month so I can see what is the highest expense for each month. So in the formula, I am trying to find x (in this case, 'Groceries') for a given month and then calculate the total.

Computer: MAC
Workbook: Expenses.xlsx
Sheets: Budget / OCT12 / NOV12 / DEC12 etc.

Budget Sheet:

A B C D
28 DAILY LIVING OCT NOV DEC
29 Groceries #REF
30 Dining / Eating Out
31 Pharmacy Supplies
32 Dry Cleaning
33 Salon / Hair
34 Eyewear / Contacts
35 Clothing
36 Education / Lessons


OCT12:

A B C D
58 DATE CATEGORY DESCRIPTION AMOUNT
59 1-Oct-12 Bus / Taxi / MRT Taxi $10.00
60 1-Oct-12 Dry Cleaning Astoria $10.00
61 1-Oct-12 Groceries Jasons $10.00
62 12-Oct-12 Groceries Market Place $50.00
63 12-Oct-12 Pharmacy Supplies Guardian - Toiletries $30.00
64 13-Oct-12 Groceries Marks & Spencer $60.00
65 13-Oct-12 Hardware / DIY Services Home-Fix DIY $10.00
66 16-Oct-12 Dining / Eating Out Starbucks Coffee $20.00
etc.


PLEASE NOTE: The B column (CATEGORY) allows you to select via a dropdown menu. Will this cause the formula not to work? I have indented the list on the dropdown to look like this ' Groceries', where as in the Budget Sheet A29, it shows 'Groceries'. This was so I could group categories and it was be easy on the eye when searching.

The formula I used which caused an error in cell B29 is:

=SUMPRODUCT(SUMIF(INDIRECT("'"&OCT12&"'!B59:B110"),$A29,INDIRECT("'"&OCT12&"'!D59:D110")))

Please could you let me know what the issue is.

Thanks

M

Without those leading space chars, you could just have:

=SUMIF(OCT12!B59:B110,$A29,OCT12!D59:D110)

Otherwise, you need:

=SUMPRODUCT((TRIM(OCT12!B59:B110)=$A29)+0,OCT12!D59:D110)

Note. As is, there is no reason for using INDIRECT.
 
Upvote 0
Hi all,

Just to inform you, I have not been following the forum rules. I cross posted which I've just been told is not advised. Below is a link to my question on Excel Novice:

Excel Novice - attempting to use SUMPRODUCT/SUMIF/INDIRECT but cell shows #REF.

Before you answer, please could you check this link to see whether I have received the answer you were hoping to post. As soon as my question has been resolved, I will close both threads.

Apologies for any inconvenience.

Thank you

M
 
Upvote 0
I have change the status of Excel Novice to resolved via 'Thread Tools' but I don't have an option to do so with this thread. How would I close this thread?
 
Upvote 0
I have change the status of Excel Novice to resolved via 'Thread Tools' but I don't have an option to do so with this thread. How would I close this thread?

Thread Tools does not have an option. Also, there is no need for marking a thread as "resolved" or "solved".
 
Upvote 0

Similar threads

L
Replies
6
Views
882
Legacy 464248
L

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

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