#CALC! error when using INDIRECT (the cause?)

sokolum

New Member
Joined
Aug 6, 2010
Messages
39
Formula work great, until I copying it another sheet.

The formula works great with FILTER, it produces a list of the values it finds matches with "x".
It tells which colors for each month where the "X" has been added.
=TEXTJOIN(CHAR(10),TRUE,FILTER(A:A,(INDIRECT((CHAR(64+MATCH(B10,A1:Y1,0)))&":"&(CHAR(64+MATCH(B10,A1:Y1,0)))))="x"))

When I copying the formula to a Newsheet, I get a #CALC! error, the modified formula. The Input H2 is done on the new Sheet. I disected the formula, cant find the issue.
=TEXTJOIN(CHAR(10),TRUE,FILTER(Color!B:B,(INDIRECT((CHAR(64+MATCH(Newsheet!H2,Color!A1:Y1,0)))&":"&(CHAR(64+MATCH(Newsheet!H2,Color!A1:Y1,0)))))="x"))

Sheet: Color

ABCDEF
1JanuariFebruariMarchAprilMay
2redxx
3orangex
4yellowxx
5greenxx
6bluexx
7indigoxxx
8violetxxx
9
10Input:Januari
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Why not use index rather than indirect
Excel Formula:
=TEXTJOIN(CHAR(10),TRUE,FILTER(Color!A2:A100,INDEX(Color!A2:Y100,,MATCH(H2,Color!A1:Y1,0))="x"))
 
Upvote 0
Filter is very easy to use and requires less input, it finds and it is capable of showing all the values it has found:
=FILTER(A1:A9,B1:B9="x")

Issue still remains.
 
Upvote 0
Are you saying the formula I posted does not work?
 
Upvote 0
This formula is not working, to me it seems to stop at INDIRECT.
This example I made a typo by writing B:B, should have been in this example A:A.

FILTER is working when adding manual the cell locations
MATCH is working too.
CHAR is working too.
But the issue start when using INDIRECT, as i want to capture have the whole COLUMN, e.g.: B:B

=TEXTJOIN(CHAR(10),TRUE,FILTER(Color!A:A,(INDIRECT((CHAR(64+MATCH(Newsheet!H2,Color!
A1:Y1,0)))&":"&(CHAR(64+MATCH(Newsheet!H2,Color!A1:Y1,0)))))="x"))

What this formula will do:

- Look at your manual input: H2
January

- It find a MATCH (January) by searching at the ROW A1:Y1 (actual list is much bigger)
- It then count the COLUMN and using CHAR to get the COLUMN letter
- with INDIRECT it takes the 'text' input as a value to be used by FILTER to search for that "x"
- Where FILTER reads the "x", it reports back the value it reads in Column B:B
 
Last edited:
Upvote 0
Did you actually try the formula I suggested, rather than that monstrosity?
 
Upvote 0
Why not use index rather than indirect
Excel Formula:
=TEXTJOIN(CHAR(10),TRUE,FILTER(Color!A2:A100,INDEX(Color!A2:Y100,,MATCH(H2,Color!A1:Y1,0))="x"))
Works excellent.
I tried to get this done with INDEX, but was not able to get my head around when doing the ARRAY!

Note: Last time i did something like such in Excel was about 10 years ago...

Thank you!
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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